home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / comm / tcp / AmiPhone.lha / AmiPhone / Source.patch < prev   
Encoding:
Text File  |  1998-03-13  |  200.9 KB  |  6,409 lines

  1. Binary files ../AmiPhone_1.92/AmiPhone.guide.icon.info and ./AmiPhone.guide.icon.info differ
  2. Binary files ../AmiPhone_1.92/AmiPhoneDrawer.info and ./AmiPhoneDrawer.info differ
  3. Binary files ../AmiPhone_1.92/AmiPhoneIcon.info and ./AmiPhoneIcon.info differ
  4. diff -r -C 2 -P ../AmiPhone_1.92/AmiPhoned.h ./AmiPhoned.h
  5. *** ../AmiPhone_1.92/AmiPhoned.h    Sat Nov 16 23:46:40 1996
  6. --- ./AmiPhoned.h    Sun Feb 15 18:45:41 1998
  7. ***************
  8. *** 4,7 ****
  9. --- 4,9 ----
  10.   #define MSG_READY   0x02
  11.   
  12. + #include <CompilerSpecific.h>
  13.   int MakeReq(char *sTitle, char *sText, char *sGadgets);
  14.   int SpaceUsedInDir(char * szDirectory);
  15. diff -r -C 2 -P ../AmiPhone_1.92/CompilerSpecific.h ./CompilerSpecific.h
  16. *** ../AmiPhone_1.92/CompilerSpecific.h    Thu Jan  1 01:00:00 1970
  17. --- ./CompilerSpecific.h    Sun Mar  1 02:23:59 1998
  18. ***************
  19. *** 0 ****
  20. --- 1,234 ----
  21. + #ifndef COMPILERSPECIFIC_H
  22. + #define COMPILERSPECIFIC_H
  23. + /*
  24. + **    $VER: CompilerSpecific.h 2.2 (1.10.97)
  25. + **
  26. + **    Copyright (C) 1997 Bernardo Innocenti. All rights reserved.
  27. + **
  28. + **    Compiler specific definitions is here. You can add support
  29. + **    for other compilers in this header. Please return any changes
  30. + **    you make to me, so I can add them to my personal copy of this file.
  31. + **
  32. + **    Here is a short description of the macros defined below:
  33. + **
  34. + **    LIBCALL
  35. + **        Shared library entry point, with register args
  36. + **
  37. + **    HOOKCALL
  38. + **        Hook or boopsi dispatcher entry point with arguments
  39. + **        passed in registers
  40. + **
  41. + **    INLINE
  42. + **        Please put function body inline to the calling code
  43. + **
  44. + **    STDARGS
  45. + **        Function uses standard C conventions for arguments
  46. + **
  47. + **    ASMCALL
  48. + **        Function takes arguments in the specified 68K registers
  49. + **
  50. + **    REGCALL
  51. + **        Function takes arguments in registers choosen by the compiler
  52. + **
  53. + **    CONSTCALL
  54. + **        Function does not modify any global variable
  55. + **
  56. + **    FORMATCALL(archetype,string_index,first_to_check)
  57. + **        Function uses printf or scanf-like formatting
  58. + **
  59. + **    SAVEDS
  60. + **        Function needs to reload context for small data model
  61. + **
  62. + **    INTERRUPT
  63. + **        Function will be called from within an interrupt
  64. + **
  65. + **    NORETURN
  66. + **        Function does never return
  67. + **
  68. + **    ALIGNED
  69. + **        Variable must be aligned to longword boundaries
  70. + **
  71. + **    CHIP
  72. + **        Variable must be stored in CHIP RAM
  73. + **
  74. + **    REG(reg,arg)
  75. + **        Put argument <arg> in 68K register <reg>
  76. + **
  77. + **    min(a,b)
  78. + **        Return the minimum between <a> and <b>
  79. + **
  80. + **    max(a,b)
  81. + **        Return the maximum between <a> and <b>
  82. + **
  83. + **    abs(a)
  84. + **        Return the absolute value of <a>
  85. + **
  86. + **    _COMPILED_WITH
  87. + **        A string containing the name of the compiler
  88. + */
  89. + #ifdef __SASC
  90. +     /* SAS/C 6.58 or better */
  91. +     #define INLINE        static __inline
  92. +     #define STDARGS        __stdargs
  93. +     #define ASMCALL        __asm
  94. +     #define REGCALL        __regcall
  95. +     #define CONSTCALL    /* unsupported */
  96. +     #define FORMATCALL    /* unsupported */
  97. +     #define SAVEDS        __saveds
  98. +     #define INTERRUPT    __interrupt
  99. +     #define NORETURN    /* unsupported */
  100. +     #define ALIGNED        __aligned
  101. +     #define CHIP        __chip
  102. +     #define REG(reg,arg) register __##reg arg
  103. +     #define _COMPILED_WITH    "SAS/C"
  104. +     /* For min(), max() and abs() */
  105. +     #define USE_BUILTIN_MATH
  106. +     #include <string.h>
  107. + #else
  108. + #ifdef __GNUC__
  109. +     /* GeekGadgets GCC 2.7.2.1 or better */
  110. +     #define INLINE        static inline
  111. +     #define STDARGS        __attribute__((stkparm))
  112. +     #define ASMCALL        /* nothing */
  113. +     #define REGCALL        /* nothing */
  114. +     #define CONSTCALL    __attribute__((const))
  115. +     #define FORMATCALL(a,s,f)    __attribute__((format(a,s,f)))
  116. +     #define SAVEDS        __attribute__((saveds))
  117. +     #define INTERRUPT    __attribute__((interrupt))
  118. +     #define NORETURN    __attribute__((noreturn))
  119. +     #define ALIGNED        __attribute__((aligned(4)))
  120. +     #define REG(reg,arg) arg __asm(#reg)
  121. +     #define _COMPILED_WITH    "GCC"
  122. +     #define min(a,b)    (((a)<(b))?(a):(b))
  123. +     #define max(a,b)    (((a)>(b))?(a):(b))
  124. +     #define abs(a)        (((a)>0)?(a):-(a))
  125. +     /* GCC produces code which calls these two functions
  126. +      * to initialize and copy structures and arrays.
  127. +      */
  128. +     static inline void __attribute__((stkparm)) bzero (char *buf, int len)
  129. +         { while (len--) *buf++ = 0; }
  130. +     static inline void __attribute__((stkparm)) bcopy (char *src, char *dest, int len)
  131. +         { while (len--) *dest++ = *src++; }
  132. + #else
  133. + #ifdef __STORM__
  134. +     /* StormC 2.00.23 or better */
  135. +     #define INLINE        __inline
  136. +     #define STDARGS        /* nothing */
  137. +     #define ASMCALL        /* nothing */
  138. +     #define REGCALL        register
  139. +     #define CONSTCALL    /* unsupported */
  140. +     #define FORMATCALL    /* unsupported */
  141. +     #define SAVEDS        __saveds
  142. +     #define INTERRUPT    __interrupt
  143. +     #define NORETURN    /* unsupported */
  144. +     #define ALIGNED        /* unsupported */
  145. +     #define CHIP        __chip
  146. +     #define REG(reg,arg) register __##reg arg
  147. +     #define _COMPILED_WITH    "StormC"
  148. +     #define min(a,b)    (((a)<(b))?(a):(b))
  149. +     #define max(a,b)    (((a)>(b))?(a):(b))
  150. +     #define abs(a)        (((a)>0)?(a):-(a))
  151. +     #define _INLINE_INCLUDES
  152. +     #include <string.h>
  153. + #else
  154. + #ifdef __MAXON__
  155. +     /* Maxon C/C++ */
  156. +     #define INLINE        static inline
  157. +     #define STDARGS        /* ? */
  158. +     #define ASMCALL        /* ? */
  159. +     #define REGCALL        /* ? */
  160. +     #define CONSTCALL    /* unsupported */
  161. +     #define FORMATCALL    /* unsupported */
  162. +     #define SAVEDS        __saveds
  163. +     #define INTERRUPT    __interrupt
  164. +     #define NORETURN    /* unsupported */
  165. +     #define ALIGNED        __aligned
  166. +     #define REG(reg,arg) register __##reg arg
  167. +     #define _COMPILED_WITH    "Maxon C"
  168. +     /* For min(), max() and abs() */
  169. +     #define USE_BUILTIN_MATH
  170. +     #include <string.h>
  171. +     #error Maxon C compiler support is untested. Please check all the above definitions
  172. + #else
  173. + #ifdef _DCC
  174. +     /* DICE C */
  175. +     #define INLINE        static __inline
  176. +     #define STDARGS        __stdargs
  177. +     #define ASMCALL        /* nothing */
  178. +     #define REGCALL        /* ? */
  179. +     #define CONSTCALL    /* unsupported */
  180. +     #define FORMATCALL    /* unsupported */
  181. +     #define SAVEDS        __geta4
  182. +     #define INTERRUPT    /* unsupported */
  183. +     #define NORETURN    /* unsupported */
  184. +     #define ALIGNED        __aligned
  185. +     #define REG(reg,arg)    __##reg arg
  186. +     #define _COMPILED_WITH    "DICE"
  187. +     #define min(a,b)    (((a)<(b))?(a):(b))
  188. +     #define max(a,b)    (((a)>(b))?(a):(b))
  189. +     #define abs(a)        (((a)>0)?(a):-(a))
  190. +     #error DICE compiler support is untested. Please check all the above definitions
  191. + #else
  192. + #ifdef AZTEC_C
  193. +     /* Aztec/Manx C */
  194. +     #define INLINE        static
  195. +     #define STDARGS        /* ? */
  196. +     #define ASMCALL        /* ? */
  197. +     #define REGCALL        /* ? */
  198. +     #define CONSTCALL    /* unsupported */
  199. +     #define FORMATCALL    /* unsupported */
  200. +     #define SAVEDS        __geta4
  201. +     #define INTERRUPT    /* unsupported */
  202. +     #define NORETURN    /* unsupported */
  203. +     #define ALIGNED        __aligned
  204. +     #define REG(reg,arg)    __##reg arg
  205. +     #define _COMPILED_WITH    "Manx C"
  206. +     #define min(a,b)    (((a)<(b))?(a):(b))
  207. +     #define max(a,b)    (((a)>(b))?(a):(b))
  208. +     #define abs(a)        (((a)>0)?(a):-(a))
  209. +     #error Aztec/Manx C compiler support is untested. Please check all the above definitions
  210. + #else
  211. +     #error Please add compiler specific definitions for your compiler
  212. + #endif
  213. + #endif
  214. + #endif
  215. + #endif
  216. + #endif
  217. + #endif
  218. + /* Special function attributes */
  219. + #define LIBCALL        ASMCALL SAVEDS
  220. + #define HOOKCALL    ASMCALL SAVEDS
  221. + /* AROS Compatibility: IPTR is a type which can store a pointer
  222. +  * as well as a long integer.
  223. +  */
  224. + #ifndef IPTR
  225. + #define IPTR LONG
  226. + #endif /* IPTR */
  227. + #endif /* !COMPILERSPECIFIC_H */
  228. diff -r -C 2 -P ../AmiPhone_1.92/EditTextFile.rexx ./EditTextFile.rexx
  229. *** ../AmiPhone_1.92/EditTextFile.rexx    Thu Jan  1 01:00:00 1970
  230. --- ./EditTextFile.rexx    Sun Jul  7 20:43:18 1996
  231. ***************
  232. *** 0 ****
  233. --- 1,141 ----
  234. + /* 
  235. +    EditTextFile.rexx v1.1 by Jeremy Friesner
  236. +    An ARexx script to cleanly modify text config
  237. +    lines.  Any line beginning with sReplaceMe in 
  238. +    the File fModifyMe will be replaced with the line sWithMe.
  239. +    
  240. +    If no such thing as sReplaceMe is found in the
  241. +    file, then sWithMe will be added to the end of
  242. +    the file. 
  243. +    This script should never lose the original file:
  244. +    the first thing it does it rename the file to
  245. +    filename.bak and then reconstructs the modified
  246. +    version at the original file name by reading the
  247. +    .bak file.  If an error occurs, it will restore
  248. +    filename.bak back to the original filename.
  249. +    
  250. +    Any ^ signs in the sReplaceMe or sWithMe args will
  251. +    be turned into space characters.  (Although sReplaceMe
  252. +    doesn't actually need these, because it's the last
  253. +    arg and thus spaces will be included in it anyway.
  254. +    Isn't Rexx argument passing fun?)
  255. + */
  256. +    
  257. + parse arg fModifyMe sReplaceMe sWithMe
  258. + address COMMAND
  259. + sReplaceMe = ChangeToSpaces(sReplaceMe)
  260. + sWithMe    = strip(ChangeToSpaces(sWithMe))
  261. + fBackupFile = fModifyMe || ".bak"
  262. + say "File to be modified   = [" || fModifyMe || "]"
  263. + say "Backup file           = [" || fBackupFile || "]"
  264. + say "String to add/replace = [" || sReplaceMe || "]"
  265. + say "add/Replace with      = [" || sWithMe || "]"
  266. + keylength = length(sReplaceMe)
  267. + /* First, make sure rexxsupport.library is available. */
  268. + call addlib("rexxsupport.library", 0, -30, 0)
  269. + /* Delete any .bak file that now exists */
  270. + call delete(fBackupFile)
  271. + /* Rename the original filename to filename.bak */
  272. + if (rename(fModifyMe, fBackupFile) == 0) then do
  273. +     say "Error:  Couldn't rename " || fModifyMe || " to " || fBackupFile
  274. +     exit(30)
  275. +     end
  276. + BFileRenamed = 1
  277. +     
  278. + /* Default == haven't found the line we want to replace yet */
  279. + BFoundOurLine = 0
  280. + /* Open the backup file for reading */
  281. + if (open('oldfile',fBackupFile,'R') == 0) then do
  282. +     say "Couldn't open backup file " || fBackupFile
  283. +     call error
  284. +     end
  285. +     
  286. + /* and the new file for writing */
  287. + if (open('newfile',fModifyMe,'W') == 0) then do
  288. +     say "Couldn't open output file " || fModifyMe
  289. +     call error
  290. +     end
  291. + /* Scan the old file, writing the new one */
  292. + do while (EOF('oldfile') == 0)
  293. +  nextline = readln('oldfile')
  294. +  sCheckPart = left(nextline,keylength)
  295. +  
  296. +  if ((BFoundOurLine == 0)&(sCheckPart = sReplaceMe)) then 
  297. +  do
  298. +      /* don't write out this line... write out our substitute instead! */
  299. +      say "Found: [" || nextline || "] replacing with [" || sWithMe || "]"
  300. +     call writeln('newfile',sWithMe)
  301. +     BFoundOurLine = 1
  302. +  end
  303. +  else do
  304. +     call writeln('newfile',nextline)
  305. +     end
  306. + end
  307. + /* If we never found our line to replace, then just add our
  308. +    line at the end of the file. */
  309. + if (BFoundOurLine == 0) then call writeln('newfile',sWithMe)
  310. + call close('oldfile')
  311. + call close('newfile')
  312. + /* success! */
  313. + successMessage = "File " || fModifyMe || " successfully modified (" || sReplaceMe || ") -> " || "(" || sWithMe || ")."
  314. + say successMessage
  315. + /* Show calling app that we succeeded */
  316. + address COMMAND 'echo ' || successMessage || ' >t:edit_text_succeeded'
  317. + exit(0)
  318. + /* Changes all occurrences of the character '^' to spaces in the string. 
  319. +    Needed to get around ARexx's lame argument parsing.   I think.
  320. + */
  321. + ChangeToSpaces: procedure
  322. +     parse arg sOrig
  323. +     
  324. +     sNew = ""
  325. +     do while (length(sOrig) > 0)
  326. +         cChar = left(sOrig,1)
  327. +         if (cChar == "^") then cChar = " "
  328. +         sNew = sNew || cChar
  329. +         sOrig = right(sOrig,length(sOrig)-1)
  330. +         end
  331. +     return sNew
  332. +         
  333. +         
  334. + /* Replaces original file if an error occurs */        
  335. + error:
  336. +     say "An error occured!"
  337. +     call close('oldfile')
  338. +     call close('newfile')
  339. +     if (BFileRenamed == 1) then do
  340. +         say "Attempting to restore the original file " || fModifyMe
  341. +         /* Delete the incomplete file that now exists */
  342. +         call rename(fModifyMe, fModifyMe || ".tobedeleted")
  343. +         /* Rename filename.bak back to filename */
  344. +         if (rename(fBackupFile, fModifyMe) == 0) then do
  345. +             call rename(fModifyMe || ".tobedeleted", fModifyMe)
  346. +             say "Error:  Couldn't rename " || fBackupFile || " to " || fModifyMe || ", aborting now."
  347. +             exit(30)
  348. +             end
  349. +             
  350. +         call delete(fModifyMe||".tobedeleted")
  351. +         say "Recovery of original file " || fModifyMe || " was successful."
  352. +         end
  353. +     exit(30)
  354. \ No newline at end of file
  355. diff -r -C 2 -P ../AmiPhone_1.92/Install_AmiPhone ./Install_AmiPhone
  356. *** ../AmiPhone_1.92/Install_AmiPhone    Sat Nov 16 23:46:46 1996
  357. --- ./Install_AmiPhone    Sun Mar  1 02:31:10 1998
  358. ***************
  359. *** 1,199 ****
  360.   ; Installation script for AmiPhone
  361.   ; by Jeremy Friesner
  362.   
  363.   (transcript "On installing AmiPhone...")
  364.   
  365.   (if (exists "AmiTCP:" (noreq))
  366. !  (
  367. !     ; make sure "rx" is available
  368. !     (if (not (exists "sys:rexxc/rx"))
  369. !         (abort "This installer script needs to use the ARexx utility rx.\n\nPlease make sure the rx utility is installed in sys:rexxc and try to install again."))
  370. !     ; make sure we have the library that EditTextFile.rexx needs
  371. !     (if (not (exists "libs:rexxsupport.library"))
  372. !         (abort "This installer script needs rexxsupport.library in LIBS: to run.\n\nPlease install this library and then run this Installer script again."))
  373. !     ; try and make sure ARexx is running 
  374. !     (run "rexxmast" (safe))
  375. !     ; if AmiPhoned is already in /serv, probably they've already installed before
  376. !     (set DefaultUpdate (exists "amitcp:serv/AmiPhoned" (noreq)))
  377.   
  378. !     ; don't want to make a distinction between 1 and 2
  379. !     (if (> DefaultUpdate 0)    (set DefaultUpdate 1))
  380.       
  381. !     (set PhoneUpdate
  382. !           (askchoice
  383. !              (prompt "Select which kind of install you want:")
  384. !              (choices "First Time Install" "Update")
  385. !              (default DefaultUpdate)
  386. !              (help "If you've never installed AmiPhone on your system before, select First Time Install.  If you already have an earlier version, select Update.")
  387. !        ))
  388. !     ; see if we can't guess what digitizer they use, based on files in their system drawer    
  389. !     (set nGuessDefault 8)    ; default default is Generic
  390. !     (if (exists "devs:ahi.device") (set nGuessDefault 7))
  391. !     (if (exists "libs:toccata.library") (set nGuessDefault 3))
  392. !     (if (exists "libs:delfina.library") (set nGuessDefault 6))
  393.       
  394. !     ; ask the user what kind of digitizer they use
  395. !     (set Digitizer
  396. !           (askchoice
  397. !                (prompt "Select which type of audio digitizer you will be using with AmiPhone:")
  398. !                (choices "GVP DSS8" "PerfectSound" "A.M.A.S." "Toccata (Zorro II)" "Aura (PCMCIA)" "Sound Magic" "Delfina (Zorro II)" "AHI (Audio Library)" "Generic Parallel Port digitizer")
  399. !                (default nGuessDefault)
  400. !                (help "To send speech with AmiPhone, you need an audio digitizer connected to your parallel port.  If your digitizer model is not listed, please choose the Generic option.")
  401. !           )
  402. !     )
  403. !     (select Digitizer
  404. !         (set Digitizer "DSS8")
  405. !         (set Digitizer "PERFECTSOUND")
  406. !         (set Digitizer "AMAS")
  407. !         (set Digitizer "TOCCATA")
  408. !         (set Digitizer "AURA")
  409. !         (set Digitizer "SOUNDMAGIC")
  410. !         (set Digitizer "DELFINA")
  411. !         (set Digitizer "AHI")
  412. !         (set Digitizer "GENERIC")
  413. !     )
  414.       (tooltype
  415.           (dest "AmiPhone")
  416. !         (settooltype "SAMPLER" Digitizer)
  417. !     )
  418.   
  419. !     ; do they want to set up AmiPhone to receive voice-mail?
  420. !     (if (= 1 (askbool 
  421. !         (prompt "\n\nDo you wish to set up AmiPhone to receive voice mail?")
  422. !         (help "AmiPhone is capable of receiving and storing voice messages while you are away from your computer.  This takes some disk space though, so if you're tight on space, you might want to leave it disabled.")
  423. !         (default 0)
  424. !         (choices "Yes" "No")))
  425. !     ; answered yes
  426. !     (
  427. !         (set MessageDir 
  428. !             (askdir
  429. !                         (prompt "What directory would you like AmiPhone to keep the voice message files in?  (NOTE: You should not keep any other files in this directory!)")
  430. !                             (help @askdir-help)
  431. !                             (default "work:")))
  432. !                 (set MaxDirSize
  433. !                     (asknumber
  434. !                         (prompt "\n\nWhat should be the maximum possible size (in kilobytes) of this directory be?  (Enter -1 for unlimited size)")
  435. !                         (help "By setting this value, you can guarantee that AmiPhoned will not let anyone fill up your hard drive.  AmiPhoned counts the bytes in the voice mail directory on startup, and will reject messages if the directory size has reached the size you specify here.")
  436. !                 (default 500)
  437. !                 (range -1 1000000)))
  438. !         
  439. !         ; if a max size was set for the dir, use that as the max max file size as well
  440. !         (if (> MaxDirSize -1)
  441. !             (set MaxFileSize MaxDirSize)
  442. !             (set MaxFileSize 1000000))
  443. !         
  444. !         (set MaxFileSize
  445. !             (asknumber
  446. !                 (prompt "\n\nWhat should the maximum possible size (in kilobytes) of each message be?  (Enter -1 to impose no special limit on individual message size)")
  447. !                         (help "By setting this value, you can guarantee that no one message will fill up your entire allotment of message space.")
  448. !                 (default -1)
  449. !                 (range -1 MaxFileSize)))
  450. !                 (set AwayVar
  451. !                     (askstring
  452. !                         (prompt "\n\nAmiPhone uses the presence of an ENV: var to determine whether or not you're away.  If the ENV: var is present, it takes a message, otherwise it puts up a requester for you.  What ENV: var would you like AmiPhone to look for?")
  453. !                         (help "The ENV: var can be set manually by you, by a script, or perhaps by your screen blanker.")
  454. !                 (default "BLANKED")))
  455. !         
  456. !         ; set the tooltypes!    
  457. !         (set BlankString "")
  458. !         (tooltype
  459. !             (dest "AmiPhone")
  460. !             (settooltype "VOICEMAILDIR" MessageDir))
  461. !         (tooltype
  462. !             (dest "AmiPhone")
  463. !             (settooltype "AWAYVAR" AwayVar))
  464. !         (if (> MaxDirSize -1)
  465. !         ((tooltype
  466. !             (dest "AmiPhone")
  467. !             (settooltype "MAXVOICEMAILSIZE" (cat BlankString MaxDirSize))))
  468. !         ;else
  469. !         ((tooltype (dest "AmiPhone") (settooltype "MAXVOICEMAILSIZE"))))
  470. !         
  471. !         (if (> MaxFileSize -1)    
  472. !         ((tooltype
  473. !             (dest "AmiPhone")
  474. !             (settooltype "MAXMESSAGESIZE" (cat BlankString MaxFileSize))))
  475. !         ;else
  476. !         ((tooltype (dest "AmiPhone") (settooltype "MAXMESSAGESIZE"))))
  477. !         
  478. !     )
  479. !     ; answered no
  480. !     (
  481. !         ; clean out any related tooltypes 
  482. !         (tooltype (dest "AmiPhone") (settooltype "VOICEMAILDIR"))
  483. !         (tooltype (dest "AmiPhone") (settooltype "MAXVOICEMAILSIZE"))
  484. !         (tooltype (dest "AmiPhone") (settooltype "MAXMESSAGESIZE"))
  485. !         (tooltype (dest "AmiPhone") (settooltype "AWAYVAR"))
  486. !     ))
  487. !     
  488. !     (set PhoneDir
  489. !         (askdir
  490. !                     (prompt "What directory would you like to put the AmiPhone executable in?  (no directory will be created)")
  491. !                         (help @askdir-help)
  492. !                         (default "AmiTCP:bin")
  493. !                 )
  494. !         )
  495. !     ; if PhoneDir isn't the usual, set the AMIPHONE env: var to let AmiPhoned know
  496. !     (if (not (PatMatch "Amitcp:bin" PhoneDir))
  497. !        (
  498. !         (run (cat "echo " (tackon PhoneDir "AmiPhone") " >env:AMIPHONE"))
  499. !         (run (cat "echo " (tackon PhoneDir "AmiPhone") " >envarc:AMIPHONE"))
  500. !        )
  501. !     )
  502.       
  503. !     ; Copy AmiPhone and AmiPhoned to the bin and serv directories 
  504. !     (copyfiles
  505. !         (prompt (cat "Copying AmiPhone executable to " PhoneDir))
  506. !         (help @copyfiles-help)
  507. !         (source "")
  508. !         (infos)
  509. !         (pattern "AmiPhone")
  510. !         (dest PhoneDir)
  511. !     )
  512.       
  513. !     (copyfiles
  514. !         (prompt "Copying AmiPhoned daemon to amitcp:serv")
  515. !         (help @copyfiles-help)
  516. !         (source "")
  517. !         (infos)
  518. !         (pattern "AmiPhoned")
  519. !         (dest "amitcp:serv")
  520.       )
  521.   
  522. !     ; If we're doing a first-time install, update the user's AmiTCP config files
  523. !     (if (= 0 PhoneUpdate)    
  524. !       (
  525. !         (delete "t:edit_text_succeeded")
  526. !         (set ARexxRunString (cat "sys:rexxc/rx EditTextFile.rexx amitcp:db/services AmiPhone AmiPhone^^^^^^^^2956/tcp"))
  527. !         (run
  528. !             (ARexxRunString)
  529. !             (prompt "If you plan to be running AmiPhone in conjunction with AmiTCP, the line:\n\nAmiPhone        2956/tcp\n\nneeds to be present in your amitcp:db/services file.  Do you wish me to update the file?  (Note:  AmiPhone will not receive connections if this line is not precisely as shown above!)")
  530. !             (help "The inclusion of this line into amitcp:db/services is done by an ARexx script which is smart enough to correctly edit previous installations.  Also it will make a backup (to amitcp:db/services.bak) before writing.")
  531. !             (confirm)
  532.           )
  533. !         (if (not (exists "t:edit_text_succeeded"))
  534. !            (message "For some reason, the config file editing script (EditText.rexx) could not complete successfully.  You'll need to edit your amitcp:db/services file yourself.  Look in the 'Installation' section of the AmiPhone docs for instructions."))
  535. !                     
  536. !         (delete "t:edit_text_succeeded")
  537. !         (set ARexxRunString (cat "sys:rexxc/rx EditTextFile.rexx amitcp:db/inetd.conf AmiPhone AmiPhone^^^^stream^^^^^^tcp^nowait^root^^^^amitcp:serv/AmiPhoned"))
  538. !         (run
  539. !             (ARexxRunString)
  540. !             (prompt "\nAlso, the line:\n\nAmiPhone    stream      tcp nowait root    amitcp:serv/AmiPhoned\n\nneeds to be present in your amitcp:db/inetd.conf file.  Do you wish me to update that file?\n(Note:  AmiPhone will not receive connections if this line is not precisely as shown above!)")
  541. !             (help "The inclusion of this line into amitcp:db/inetd.conf is done by an ARexx script which is smart enough to correctly edit previous installations.  Also it will make a backup (to amitcp:db/inetd.conf.bak) before writing.")
  542. !             (confirm)
  543.           )
  544. !         (if (not (exists "t:edit_text_succeeded"))
  545. !            (message "For some reason, the config file editing script (EditText.rexx) could not complete successfully.  You'll need to edit your amitcp:db/inetd.conf file yourself.  Look in the 'Installation' section of the AmiPhone docs for instructions."))
  546. !       )
  547.       )
  548.       (message "\n\nAmiPhone is now installed.\nRe-start AmiTCP and try it out!")
  549. !  )
  550. !  (abort "\n\nAmiTCP does not appear to be set up on your system.  (Specifically, the assign AmiTCP: has not been made)  Because of this, I am unable to install AmiPhone.  Please install AmiTCP and then try again.")
  551. ! )
  552. \ No newline at end of file
  553. --- 1,255 ----
  554.   ; Installation script for AmiPhone
  555.   ; by Jeremy Friesner
  556. + ; Miami additions by Fredrik Rambris
  557. + ; Martin Blom removed the Delfina lines...
  558.   
  559.   (transcript "On installing AmiPhone...")
  560.   
  561.   (if (exists "AmiTCP:" (noreq))
  562. !     (set defc 1)
  563. !     (set defc 0)
  564. ! )
  565. ! (set inst
  566. !     (askchoice
  567. !         (prompt "Select which TCP/IP-stack to install for")
  568. !         (help "Short: Which package do you use to connect to internet with?")
  569. !         (choices "Miami"
  570. !                  "AmiTCP"
  571. !         )
  572. !         (default defc)
  573. !     )
  574. ! )
  575.   
  576. ! (if inst
  577. !     (
  578. !         ; make sure "rx" is available
  579. !         (if (not (exists "sys:rexxc/rx"))
  580. !             (abort "This installer script needs to use the ARexx utility rx.\n\nPlease make sure the rx utility is installed in sys:rexxc and try to install again."))
  581. !         ; make sure we have the library that EditTextFile.rexx needs
  582. !         (if (not (exists "libs:rexxsupport.library"))
  583. !             (abort "This installer script needs rexxsupport.library in LIBS: to run.\n\nPlease install this library and then run this Installer script again."))
  584. !         ; try and make sure ARexx is running 
  585. !         (run "rexxmast" (safe))
  586. !     )
  587. ! )
  588. ! ; if AmiPhoned is already in /serv, probably they've already installed before
  589. ! (set DefaultUpdate (exists "amitcp:serv/AmiPhoned" (noreq)))
  590. ! ; don't want to make a distinction between 1 and 2
  591. ! (if (> DefaultUpdate 0)    (set DefaultUpdate 1))
  592. ! (set PhoneUpdate
  593. !       (askchoice
  594. !          (prompt "Select which kind of install you want:")
  595. !          (choices "First Time Install" "Update")
  596. !          (default DefaultUpdate)
  597. !          (help "If you've never installed AmiPhone on your system before, select First Time Install.  If you already have an earlier version, select Update.")
  598. !    ))
  599. ! ; see if we can't guess what digitizer they use, based on files in their system drawer    
  600. ! (set nGuessDefault 7)    ; default default is Generic
  601. ! (if (exists "devs:ahi.device") (set nGuessDefault 6))
  602. ! (if (exists "libs:toccata.library") (set nGuessDefault 3))
  603. ! ; ask the user what kind of digitizer they use
  604. ! (set Digitizer
  605. !       (askchoice
  606. !            (prompt "Select which type of audio digitizer you will be using with AmiPhone:")
  607. !            (choices "GVP DSS8" "PerfectSound" "A.M.A.S." "Toccata (Zorro II)" "Aura (PCMCIA)" "Sound Magic" "AHI" "Generic Parallel Port digitizer")
  608. !            (default nGuessDefault)
  609. !            (help "To send speech with AmiPhone, you need an audio digitizer connected to your parallel port.  If your digitizer model is not listed, please choose the Generic option.")
  610. !       )
  611. ! )
  612. ! (select Digitizer
  613. !     (set Digitizer "DSS8")
  614. !     (set Digitizer "PERFECTSOUND")
  615. !     (set Digitizer "AMAS")
  616. !     (set Digitizer "TOCCATA")
  617. !     (set Digitizer "AURA")
  618. !     (set Digitizer "SOUNDMAGIC")
  619. !     (set Digitizer "AHI")
  620. !     (set Digitizer "GENERIC")
  621. ! )
  622. ! (tooltype
  623. !     (dest "AmiPhone")
  624. !     (settooltype "SAMPLER" Digitizer)
  625. ! )
  626. ! ; do they want to set up AmiPhone to receive voice-mail?
  627. ! (if (= 1 (askbool 
  628. !     (prompt "\n\nDo you wish to set up AmiPhone to receive voice mail?")
  629. !     (help "AmiPhone is capable of receiving and storing voice messages while you are away from your computer.  This takes some disk space though, so if you're tight on space, you might want to leave it disabled.")
  630. !     (default 0)
  631. !     (choices "Yes" "No")))
  632. ! ; answered yes
  633. ! (
  634. !     (set MessageDir 
  635. !         (askdir
  636. !                     (prompt "What directory would you like AmiPhone to keep the voice message files in?  (NOTE: You should not keep any other files in this directory!)")
  637. !                         (help @askdir-help)
  638. !                         (default "work:")))
  639. !             (set MaxDirSize
  640. !                 (asknumber
  641. !                     (prompt "\n\nWhat should be the maximum possible size (in kilobytes) of this directory be?  (Enter -1 for unlimited size)")
  642. !                     (help "By setting this value, you can guarantee that AmiPhoned will not let anyone fill up your hard drive.  AmiPhoned counts the bytes in the voice mail directory on startup, and will reject messages if the directory size has reached the size you specify here.")
  643. !             (default 500)
  644. !             (range -1 1000000)))
  645.       
  646. !     ; if a max size was set for the dir, use that as the max max file size as well
  647. !     (if (> MaxDirSize -1)
  648. !         (set MaxFileSize MaxDirSize)
  649. !         (set MaxFileSize 1000000))
  650.       
  651. !     (set MaxFileSize
  652. !         (asknumber
  653. !             (prompt "\n\nWhat should the maximum possible size (in kilobytes) of each message be?  (Enter -1 to impose no special limit on individual message size)")
  654. !                     (help "By setting this value, you can guarantee that no one message will fill up your entire allotment of message space.")
  655. !             (default -1)
  656. !             (range -1 MaxFileSize)))
  657. !             (set AwayVar
  658. !                 (askstring
  659. !                     (prompt "\n\nAmiPhone uses the presence of an ENV: var to determine whether or not you're away.  If the ENV: var is present, it takes a message, otherwise it puts up a requester for you.  What ENV: var would you like AmiPhone to look for?")
  660. !                     (help "The ENV: var can be set manually by you, by a script, or perhaps by your screen blanker.")
  661. !             (default "BLANKED")))
  662. !     
  663. !     ; set the tooltypes!    
  664. !     (set BlankString "")
  665.       (tooltype
  666.           (dest "AmiPhone")
  667. !         (settooltype "VOICEMAILDIR" MessageDir))
  668. !     (tooltype
  669. !         (dest "AmiPhone")
  670. !         (settooltype "AWAYVAR" AwayVar))
  671.   
  672. !     (if (> MaxDirSize -1)
  673. !     ((tooltype
  674. !         (dest "AmiPhone")
  675. !         (settooltype "MAXVOICEMAILSIZE" (cat BlankString MaxDirSize))))
  676. !     ;else
  677. !     ((tooltype (dest "AmiPhone") (settooltype "MAXVOICEMAILSIZE"))))
  678.       
  679. !     (if (> MaxFileSize -1)    
  680. !     ((tooltype
  681. !         (dest "AmiPhone")
  682. !         (settooltype "MAXMESSAGESIZE" (cat BlankString MaxFileSize))))
  683. !     ;else
  684. !     ((tooltype (dest "AmiPhone") (settooltype "MAXMESSAGESIZE"))))
  685.       
  686. ! )
  687. ! ; answered no
  688. ! (
  689. !     ; clean out any related tooltypes 
  690. !     (tooltype (dest "AmiPhone") (settooltype "VOICEMAILDIR"))
  691. !     (tooltype (dest "AmiPhone") (settooltype "MAXVOICEMAILSIZE"))
  692. !     (tooltype (dest "AmiPhone") (settooltype "MAXMESSAGESIZE"))
  693. !     (tooltype (dest "AmiPhone") (settooltype "AWAYVAR"))
  694. ! ))
  695. ! (set PhoneDir
  696. !     (askdir
  697. !         (prompt "What directory would you like to put the AmiPhone executable in?\n(no directory will be created)")
  698. !         (help @askdir-help)
  699. !         (default (select inst "Work:" "AmiTCP:bin") )
  700.       )
  701. + )
  702. + (set @default-dest PhoneDir)
  703.   
  704. ! (if inst
  705. !     (set PhonedDir "AmiTCP:Serv")
  706. !     (
  707. !         (set PhonedDir
  708. !             (askdir
  709. !                 (prompt "What directory would you like to put the AmiPhoned daemon executable in?\n(no directory will be created)")
  710. !                 (help @askdir-help)
  711. !                 (default "Work:")
  712. !             )
  713.           )
  714. !     )
  715. ! )
  716. ! ; if PhoneDir isn't the usual, set the AMIPHONE env: var to let AmiPhoned know
  717. ! (if (not (PatMatch "Amitcp:bin" PhoneDir))
  718. !    (
  719. !     (run (cat "echo " (tackon PhoneDir "AmiPhone") " >env:AMIPHONE"))
  720. !     (run (cat "echo " (tackon PhoneDir "AmiPhone") " >envarc:AMIPHONE"))
  721. !    )
  722. ! )
  723. ! ; Copy AmiPhone and AmiPhoned to the bin and serv directories 
  724. ! (copyfiles
  725. !     (prompt (cat "Copying AmiPhone executable to " PhoneDir))
  726. !     (help @copyfiles-help)
  727. !     (source "")
  728. !     (infos)
  729. !     (pattern "AmiPhone")
  730. !     (dest PhoneDir)
  731. ! )
  732. ! (copyfiles
  733. !     (prompt (cat "Copying AmiPhoned daemon to %s" PhonedDir) )
  734. !     (help @copyfiles-help)
  735. !     (source "")
  736. !     (infos)
  737. !     (pattern "AmiPhoned")
  738. !     (dest PhonedDir)
  739. ! )
  740. ! ; If we're doing a first-time install, update the user's AmiTCP config files
  741. ! (if (= 0 PhoneUpdate)    
  742. !     (if inst
  743. !         (
  744. !             (delete "t:edit_text_succeeded")
  745. !             (set ARexxRunString (cat "sys:rexxc/rx EditTextFile.rexx amitcp:db/services AmiPhone AmiPhone^^^^^^^^2956/tcp"))
  746. !             (run
  747. !                 (ARexxRunString)
  748. !                 (prompt "If you plan to be running AmiPhone in conjunction with AmiTCP, the line:\n\nAmiPhone        2956/tcp\n\nneeds to be present in your amitcp:db/services file.  Do you wish me to update the file?  (Note:  AmiPhone will not receive connections if this line is not precisely as shown above!)")
  749. !                 (help "The inclusion of this line into amitcp:db/services is done by an ARexx script which is smart enough to correctly edit previous installations.  Also it will make a backup (to amitcp:db/services.bak) before writing.")
  750. !                 (confirm)
  751. !             )
  752. !             (if (not (exists "t:edit_text_succeeded"))
  753. !                (message "For some reason, the config file editing script (EditText.rexx) could not complete successfully.  You'll need to edit your amitcp:db/services file yourself.  Look in the 'Installation' section of the AmiPhone docs for instructions."))
  754. !                         
  755. !             (delete "t:edit_text_succeeded")
  756. !             (set ARexxRunString (cat "sys:rexxc/rx EditTextFile.rexx amitcp:db/inetd.conf AmiPhone AmiPhone^^^^stream^^^^^^tcp^nowait^root^^^^amitcp:serv/AmiPhoned"))
  757. !             (run
  758. !                 (ARexxRunString)
  759. !                 (prompt "\nAlso, the line:\n\nAmiPhone    stream      tcp nowait root    amitcp:serv/AmiPhoned\n\nneeds to be present in your amitcp:db/inetd.conf file.  Do you wish me to update that file?\n(Note:  AmiPhone will not receive connections if this line is not precisely as shown above!)")
  760. !                 (help "The inclusion of this line into amitcp:db/inetd.conf is done by an ARexx script which is smart enough to correctly edit previous installations.  Also it will make a backup (to amitcp:db/inetd.conf.bak) before writing.")
  761. !                 (confirm)
  762. !             )
  763. !             (if (not (exists "t:edit_text_succeeded"))
  764. !                (message "For some reason, the config file editing script (EditText.rexx) could not complete successfully.  You'll need to edit your amitcp:db/inetd.conf file yourself.  Look in the 'Installation' section of the AmiPhone docs for instructions."))
  765.           )
  766. !         (
  767. !             ; Create the textfile with a pointer to AmiPhoneD
  768. !             (textfile
  769. !                (dest "t:dbtemp")
  770. !                (append
  771. !                   "ADD services AmiPhone 2956/tcp\n"
  772. !                   ("ADD inetd AmiPhone stream tcp nowait root %s\n" (tackon PhonedDir "AmiPhoned") )
  773. !                )
  774. !             )
  775. !             ; Add the lines to envarc:MiamiChangeDB (i.e. don't overwrite! Other programs
  776. !             ; may have their lines there too)
  777. !             (run "type t:dbtemp >>envarc:MiamiChangeDB")
  778. !             ; If Miami shoule be running... why not make it read the new settings?
  779. !             (run "SYS:Rexxc/RX \"ADDRESS MIAMI.1;changedb\"")
  780. !             ; Clean up
  781. !             (delete "t:dbtemp")
  782. !         )    
  783.       )
  784. + )
  785. + (if inst
  786.       (message "\n\nAmiPhone is now installed.\nRe-start AmiTCP and try it out!")
  787. !     (message "\n\nAmiPhone is now installed.\nYou may have to re-start Miami before you start AmiPhone!")
  788. ! )
  789. Binary files ../AmiPhone_1.92/Install_AmiPhone.info and ./Install_AmiPhone.info differ
  790. diff -r -C 2 -P ../AmiPhone_1.92/PhoneUtil.c ./PhoneUtil.c
  791. *** ../AmiPhone_1.92/PhoneUtil.c    Sat Nov 16 23:46:42 1996
  792. --- ./PhoneUtil.c    Sun Feb 15 23:04:50 1998
  793. ***************
  794. *** 1,4 ****
  795. --- 1,5 ----
  796.   /* A quick program to read in an AmiPhone voice file and output
  797.      an 8-bit raw sound file */
  798. + /* :ts=4 */
  799.   
  800.   #include <stdio.h>
  801. diff -r -C 2 -P ../AmiPhone_1.92/README ./README
  802. *** ../AmiPhone_1.92/README    Thu Jan  1 01:00:00 1970
  803. --- ./README    Fri Mar 13 00:25:46 1998
  804. ***************
  805. *** 0 ****
  806. --- 1,52 ----
  807. + Short: v1.93: AmiTCP based voice chat program
  808. + Type: comm/net
  809. + Author: Jeremy Friesner <jfriesne@ucsd.edu>, Martin Blom <lcs@lysator.liu.se>
  810. + Uploader: Martin Blom <lcs@lysator.liu.se>
  811. + Requires: Workbench 2.04+, AmiTCP3.0b+, audio digitizer
  812. + Version: 1.93
  813. + ----------------------------------------------------------------
  814. +     
  815. +             AMIPHONE 1.93
  816. +                      
  817. +                    (Released 1998-03-13)
  818. +                      
  819. + ----------------------------------------------------------------
  820. + This is a public release of Jeremy Friesner's TCP/IP based voice chat
  821. + software.  With it and a digitizer and microphone, you can transmit your
  822. + voice over the Internet or a LAN to another Amiga or Amigas that are
  823. + running AmiPhone.
  824. + AmiPhone requires Workbench 2.04 or higher, AmiTCP 3.0b or higher, and a
  825. + sampler with a microphone.  Also, a fast CPU and fast Internet connection
  826. + are highly recommended.
  827. + NOTE:  AmiPhone is not compatible with I-Phone or any other
  828. +        Internet-phone type program at this time.     
  829. + New in version 1.93:
  830. +      The 1.93 changes by Martin Blom:
  831. +      - Recompiled using SAS/C 6.58.
  832. +      * Removed the Delfina support (it didn't work anymore).
  833. +      - New-Look menus.
  834. +      - The AHI audio mode is now selectable.
  835. +      - Input can be selected in AHI mode.
  836. +      * Removed some debug code.
  837. +      - Added Fredrik Rambris installer script (supports Miami).
  838. +        (I hope you don't mind, Fredrik---your mail address is not
  839. +        valid anymore.)
  840. + New in version 1.92:
  841. +      - AmiPhone's GUI is now font-sensitive.
  842. +      - Added "FONT" and "FONTSIZE" Startup Arguments.
  843. +      - Added "PRESEND" and "POSTSEND" Startup Arguments.
  844. +      - The maximum MaxXmitDelay parameter value is now 999.
  845. +      * Removed HOSTNAME configuration from Install script and docs,
  846. +        as this env var is no longer (directly) used by AmiPhone.
  847. +      * Toccata support is improved some more.  (Thanks to Georges
  848. +        Heinesch and Dan Piontak for feedback on this)
  849. +      * Removed some floating point math that was causing crashes
  850. +        on some Amigas.  (Thanks to Meni Berman for his help with this).
  851. Binary files ../AmiPhone_1.92/README.icon.info and ./README.icon.info differ
  852. diff -r -C 2 -P ../AmiPhone_1.92/Sampler.c ./Sampler.c
  853. *** ../AmiPhone_1.92/Sampler.c    Sat Nov 16 23:46:44 1996
  854. --- ./Sampler.c    Sun Feb 15 13:29:52 1998
  855. ***************
  856. *** 46,52 ****
  857.   #endif    // ciab
  858.   
  859. ! extern __far volatile struct Custom    custom;
  860. ! extern __far volatile struct CIA    ciaa;
  861. ! extern __far volatile struct CIA    ciab;
  862.   
  863.       // Audio channel bits
  864. --- 46,52 ----
  865.   #endif    // ciab
  866.   
  867. ! extern FAR volatile struct Custom    custom;
  868. ! extern FAR volatile struct CIA    ciaa;
  869. ! extern FAR volatile struct CIA    ciab;
  870.   
  871.       // Audio channel bits
  872. ***************
  873. *** 71,75 ****
  874.   #define SAMPLING_RATE    22050
  875.   
  876. ! LONG __saveds
  877.   Main(VOID)
  878.   {
  879. --- 71,75 ----
  880.   #define SAMPLING_RATE    22050
  881.   
  882. ! LONG SAVEDS
  883.   Main(VOID)
  884.   {
  885. diff -r -C 2 -P ../AmiPhone_1.92/StringRequest.c ./StringRequest.c
  886. *** ../AmiPhone_1.92/StringRequest.c    Sat Nov 16 23:46:44 1996
  887. --- ./StringRequest.c    Sun Feb 15 23:04:53 1998
  888. ***************
  889. *** 1,2 ****
  890. --- 1,5 ----
  891. + /* :ts=4 */
  892.   #include <stdio.h>
  893.   #include <time.h>
  894. ***************
  895. *** 157,161 ****
  896.   void SetBusyPointer(struct Window *win)
  897.   {
  898. !     static __chip UWORD waitPointer[] =
  899.              {0x0000, 0x0000, 0x0400, 0x07c0, 0x0000, 0x07c0, 0x0100, 0x0380,
  900.           0x0000, 0x07e0, 0x07c0, 0x1ff8, 0x1ff0, 0x3fec, 0x3ff8, 0x7fde,
  901. --- 160,164 ----
  902.   void SetBusyPointer(struct Window *win)
  903.   {
  904. !     static CHIP UWORD waitPointer[] =
  905.              {0x0000, 0x0000, 0x0400, 0x07c0, 0x0000, 0x07c0, 0x0100, 0x0380,
  906.           0x0000, 0x07e0, 0x07c0, 0x1ff8, 0x1ff0, 0x3fec, 0x3ff8, 0x7fde,
  907. diff -r -C 2 -P ../AmiPhone_1.92/TCPQueue.c ./TCPQueue.c
  908. *** ../AmiPhone_1.92/TCPQueue.c    Sat Nov 16 23:46:40 1996
  909. --- ./TCPQueue.c    Sun Feb 15 23:04:57 1998
  910. ***************
  911. *** 1,5 ****
  912. --- 1,9 ----
  913. + /* :ts=4 */
  914.   #include <stdio.h>
  915.   #include <string.h>
  916.   
  917. + #include <netinclude:sys/types.h>
  918.   #include <exec/types.h>
  919.   
  920. ***************
  921. *** 10,14 ****
  922.   #include <clib/alib_protos.h>
  923.   
  924. ! #include <errno.h>
  925.   #include <inetd.h>
  926.   #include <sys/types.h>
  927. --- 14,18 ----
  928.   #include <clib/alib_protos.h>
  929.   
  930. ! /* #include <errno.h> */
  931.   #include <inetd.h>
  932.   #include <sys/types.h>
  933. Only in ../AmiPhone_1.92: TCPQueue.c.info
  934. diff -r -C 2 -P ../AmiPhone_1.92/amiphone.c ./amiphone.c
  935. *** ../AmiPhone_1.92/amiphone.c    Sat Nov 16 23:46:46 1996
  936. --- ./amiphone.c    Tue Mar  3 09:05:11 1998
  937. ***************
  938. *** 1,3 ****
  939. --- 1,4 ----
  940.   /* AmiPhone!  by Jeremy Friesner - jfriesne@ucsd.edu */
  941. + /* :ts=4 */
  942.   
  943.   #define INTUI_V36_NAMES_ONLY
  944. ***************
  945. *** 35,38 ****
  946. --- 36,40 ----
  947.   #include <errno.h>
  948.   #include <inetd.h>
  949. + #include <sys/errno.h>
  950.   
  951.   #include <clib/alib_protos.h>
  952. ***************
  953. *** 49,55 ****
  954.   #include <pragmas/ahi_pragmas.h>
  955.   
  956. ! #include "toccata/include/libraries/toccata.h"
  957. ! #include "toccata/include/clib/toccata_protos.h"
  958. ! #include "toccata/include/pragmas/toccata_pragmas.h"
  959.   
  960.   #include "phonerexx.h"
  961. --- 51,59 ----
  962.   #include <pragmas/ahi_pragmas.h>
  963.   
  964. ! #include <libraries/toccata.h>
  965. ! #include <clib/toccata_protos.h>
  966. ! #include <pragmas/toccata_pragmas.h>
  967. ! void kprintf(char *, ...);
  968.   
  969.   #include "phonerexx.h"
  970. ***************
  971. *** 66,72 ****
  972.   #include "stringrequest.h"
  973.   #include "TCPQueue.h"
  974. - #include "delfph.h"
  975. - #define EWOULDBLOCK     35
  976.   
  977.   #define IMAGE_QUIET    0
  978. --- 70,73 ----
  979. ***************
  980. *** 135,202 ****
  981.   /* menus */
  982.   struct NewMenu nmMenus[] = {
  983. !     NM_TITLE, "Project",         NULL,  0L,         NULL, NULL,
  984. !     NM_ITEM,  "About",            "?",  0L,         NULL, (void *) P_ABOUT,
  985. !     NM_ITEM,  NM_BARLABEL,       NULL,  0L,         NULL, NULL,
  986. !     NM_ITEM,  "Quit",             "Q",  0L,         NULL, (void *) P_QUIT,
  987. !     NM_TITLE, "TCP",             NULL,  0L,        NULL, NULL,
  988. !     NM_ITEM,  "Connect To",      NULL,  0L,         NULL, NULL,
  989. !     NM_SUB,   "",             "1",  0L,       NULL, (void *) (T_CONNECTTO+0),
  990. !     NM_SUB,   "",              "2",  0L,       NULL, (void *) (T_CONNECTTO+1),
  991. !     NM_SUB,   "",             "3",  0L,       NULL, (void *) (T_CONNECTTO+2),
  992. !     NM_SUB,   "",                 "4",  0L,       NULL, (void *) (T_CONNECTTO+3),
  993. !     NM_SUB,   "",                 "5",  0L,       NULL, (void *) (T_CONNECTTO+4),
  994. !     NM_SUB,   "",                 "6",  0L,       NULL, (void *) (T_CONNECTTO+5),
  995. !     NM_SUB,   "",                 "7",  0L,       NULL, (void *) (T_CONNECTTO+6),
  996. !     NM_SUB,   "",                 "8",  0L,       NULL, (void *) (T_CONNECTTO+7),
  997. !     NM_SUB,   "",                 "9",  0L,       NULL, (void *) (T_CONNECTTO+8),
  998. !     NM_SUB,   "",                 "0",  0L,       NULL, (void *) (T_CONNECTTO+9),
  999. !     NM_ITEM,  "Connect",          "C",  0L,         NULL, (void *) T_CONNECT,
  1000. !     NM_ITEM,  "Disconnect",       "D",  0L,         NULL, (void *) T_DISCONNECT,
  1001. !     NM_ITEM,   "Show Daemon",     "S",  CHECKIT,    NULL, (void *) T_SHOWDAEMON,
  1002. !     NM_TITLE, "Messages",         NULL,  0L,         NULL, NULL,
  1003. !     NM_ITEM,  "Messages...",      "M",  0L,         NULL, (void *) M_MESSAGES,
  1004. !     NM_ITEM,  "Play Sound File",  "P",  0L,         NULL, (void *) M_PLAYFILE,
  1005. !     NM_ITEM,  "Record Memo",      "W",  CHECKIT,    NULL, (void *) M_RECORDMEMO,
  1006. !     NM_TITLE, "Settings",        NULL,  0L,         NULL, NULL,
  1007. !     NM_ITEM,  "Sampler",         NULL,  0L,         NULL, NULL,
  1008. !     NM_SUB,   "DSS8",         NULL,  CHECKIT,    NULL, (void *) S_DSS8,
  1009. !     NM_SUB,   "PerfectSound",    NULL,  CHECKIT,    NULL, (void *) S_PERFECTSOUND,
  1010. !     NM_SUB,   "AMAS",         NULL,  CHECKIT,    NULL, (void *) S_AMAS,
  1011. !     NM_SUB,   "Sound Magic",     NULL,  CHECKIT,    NULL, (void *) S_SOMAGIC,
  1012. !     NM_SUB,   "Toccata",         NULL,  CHECKIT,    NULL, (void *) S_TOCCATA,
  1013. !     NM_SUB,   "Aura PCMCIA",     NULL,  CHECKIT,    NULL, (void *) S_AURA,
  1014. !     NM_SUB,   "AHI Device",      NULL,  CHECKIT,    NULL, (void *) S_AHI,
  1015. !     NM_SUB,   "Delfina",         NULL,  CHECKIT,    NULL, (void *) S_DELFINA,
  1016. !     NM_SUB,   "Custom",         NULL,  CHECKIT,    NULL, (void *) S_CUSTOM,
  1017. !     NM_SUB,   "Generic",         NULL,  CHECKIT,    NULL, (void *) S_GENERIC,    
  1018. !     NM_ITEM,  "Compression",     NULL,  0L,            NULL, NULL,    
  1019. !     NM_SUB,   "ADPCM2",           "U",  CHECKIT,    NULL, (void *) S_ADPCM2,
  1020. !     NM_SUB,   "ADPCM3",           "I",  CHECKIT,    NULL, (void *) S_ADPCM3,
  1021. !     NM_SUB,   "None",             "O",  CHECKIT,    NULL, (void *) S_NOCOMP,
  1022. !     NM_ITEM,  "Transmit Enable", NULL,  0L,        NULL, NULL,    
  1023. !     NM_SUB,   "Toggle",           "T",  CHECKIT,    NULL, (void *) S_TOGGLE,
  1024. !     NM_SUB,   "Hold to Transmit", "H",  CHECKIT,    NULL, (void *) S_HOLD,
  1025. !     NM_ITEM,  "Line Gain",       NULL,  0L,        NULL, NULL,    
  1026. !     NM_SUB,   "Raise",            "]",  0L,        NULL, (void *) S_RAISELINEGAIN,
  1027. !     NM_SUB,   "Lower",            "[",  0L,        NULL, (void *) S_LOWERLINEGAIN,
  1028. !     NM_ITEM,  "Microphone Gain", NULL,  0L,        NULL, NULL,
  1029. !     NM_SUB,   "+20 dB",           "}",  CHECKIT,       NULL, (void *) S_TWENTYMICGAIN,
  1030. !     NM_SUB,   "+0 dB",            "{",  CHECKIT,       NULL, (void *) S_ZEROMICGAIN,    
  1031. !     NM_ITEM,  "Digital Amplify", NULL,  0L,         NULL, NULL,
  1032. !     NM_SUB,   "1X",                 NULL,  CHECKIT,    NULL, (void *) S_AMPONE,
  1033. !     NM_SUB,   "2X",                 NULL,  CHECKIT,    NULL, (void *) S_AMPTWO,
  1034. !     NM_SUB,   "4X",                 NULL,  CHECKIT,    NULL, (void *) S_AMPFOUR,
  1035. !     NM_ITEM,  "Input Channel",   NULL,  0L,        NULL, NULL,        
  1036. !     NM_SUB,   "Left",             "L",  CHECKIT,       NULL, (void *) S_LEFTCHANNEL,
  1037. !     NM_SUB,   "Right",            "R",  CHECKIT,       NULL, (void *) S_RIGHTCHANNEL,
  1038. !     NM_ITEM,  "Input Source",    NULL,  0L,        NULL, NULL,    
  1039. !     NM_SUB,   "Microphone",       "-",  CHECKIT,       NULL, (void *) S_INPUTMIC,
  1040. !     NM_SUB,   "Line",             "=",  CHECKIT,       NULL, (void *) S_INPUTEXT,
  1041. !     NM_ITEM,  "Enable on Connect","X",  CHECKIT,    NULL, (void *) S_ENABLEONCONN,
  1042. !     NM_ITEM,  "Xmit on Play",     "Y",  CHECKIT,    NULL, (void *) S_XMITONPLAY,
  1043. !     NM_ITEM,  "TCP Batch Xmit",   "B",  CHECKIT,    NULL, (void *) S_TCPBATCHXMIT,
  1044. !     NM_END,   NULL,             NULL,  NULL,       NULL, NULL
  1045.   };
  1046.   
  1047.   
  1048.   /* private functions */
  1049. --- 136,238 ----
  1050.   /* menus */
  1051.   struct NewMenu nmMenus[] = {
  1052. !     NM_TITLE, "Project",         NULL,    0L,            NULL, NULL,
  1053. !     NM_ITEM,  "About",              "?",    0L,            NULL, (void *) P_ABOUT,
  1054. !     NM_ITEM,  NM_BARLABEL,         NULL,    0L,            NULL, NULL,
  1055. !     NM_ITEM,  "Quit",              "Q",    0L,            NULL, (void *) P_QUIT,
  1056. !     NM_TITLE, "TCP",             NULL,    0L,            NULL, NULL,
  1057. !     NM_ITEM,  "Connect To",         NULL,    0L,            NULL, NULL,
  1058. !     NM_SUB,      "",                  "1",    0L,            NULL, (void *) (T_CONNECTTO+0),
  1059. !     NM_SUB,      "",                  "2",    0L,            NULL, (void *) (T_CONNECTTO+1),
  1060. !     NM_SUB,      "",                  "3",    0L,            NULL, (void *) (T_CONNECTTO+2),
  1061. !     NM_SUB,      "",                  "4",    0L,            NULL, (void *) (T_CONNECTTO+3),
  1062. !     NM_SUB,      "",                  "5",    0L,            NULL, (void *) (T_CONNECTTO+4),
  1063. !     NM_SUB,      "",                  "6",    0L,            NULL, (void *) (T_CONNECTTO+5),
  1064. !     NM_SUB,      "",                  "7",    0L,            NULL, (void *) (T_CONNECTTO+6),
  1065. !     NM_SUB,      "",                  "8",    0L,            NULL, (void *) (T_CONNECTTO+7),
  1066. !     NM_SUB,      "",                  "9",    0L,            NULL, (void *) (T_CONNECTTO+8),
  1067. !     NM_SUB,      "",                  "0",    0L,            NULL, (void *) (T_CONNECTTO+9),
  1068. !     NM_ITEM,  "Connect",          "C",    0L,            NULL, (void *) T_CONNECT,
  1069. !     NM_ITEM,  "Disconnect",          "D",    0L,            NULL, (void *) T_DISCONNECT,
  1070. !     NM_ITEM,   "Show Daemon",      "S",    CHECKIT,    NULL, (void *) T_SHOWDAEMON,
  1071. !     NM_TITLE, "Messages",         NULL,    0L,            NULL, NULL,
  1072. !     NM_ITEM,  "Messages...",      "M",    0L,            NULL, (void *) M_MESSAGES,
  1073. !     NM_ITEM,  "Play Sound File",  "P",    0L,            NULL, (void *) M_PLAYFILE,
  1074. !     NM_ITEM,  "Record Memo",      "W",    CHECKIT,    NULL, (void *) M_RECORDMEMO,
  1075. !     NM_TITLE, "Settings",         NULL,    0L,            NULL, NULL,
  1076. !     NM_ITEM,  "Sampler",         NULL,    0L,            NULL, NULL,
  1077. !     NM_SUB,      "DSS8",             NULL,    CHECKIT,    NULL, (void *) S_DSS8,
  1078. !     NM_SUB,      "PerfectSound",     NULL,    CHECKIT,    NULL, (void *) S_PERFECTSOUND,
  1079. !     NM_SUB,      "AMAS",             NULL,    CHECKIT,    NULL, (void *) S_AMAS,
  1080. !     NM_SUB,      "Sound Magic",     NULL,    CHECKIT,    NULL, (void *) S_SOMAGIC,
  1081. !     NM_SUB,      "Toccata",         NULL,    CHECKIT,    NULL, (void *) S_TOCCATA,
  1082. !     NM_SUB,      "Aura PCMCIA",     NULL,    CHECKIT,    NULL, (void *) S_AURA,
  1083. !     NM_SUB,      "AHI Device",         NULL,    CHECKIT,    NULL, (void *) S_AHI,
  1084. !     NM_SUB,      "Custom",             NULL,    CHECKIT,    NULL, (void *) S_CUSTOM,
  1085. !     NM_SUB,      "Generic",         NULL,    CHECKIT,    NULL, (void *) S_GENERIC,
  1086. !     NM_SUB,      NM_BARLABEL,         NULL,    0L,            NULL, NULL,
  1087. !     NM_SUB,      "AHI Mode...",     NULL,    0L,            NULL, (void *) S_AHIMODE,
  1088. !     NM_ITEM,  "Compression",     NULL,    0L,            NULL, NULL, 
  1089. !     NM_SUB,      "ADPCM2",              "U",    CHECKIT,    NULL, (void *) S_ADPCM2,
  1090. !     NM_SUB,      "ADPCM3",              "I",    CHECKIT,    NULL, (void *) S_ADPCM3,
  1091. !     NM_SUB,      "None",              "O",    CHECKIT,    NULL, (void *) S_NOCOMP,
  1092. !     NM_ITEM,  "Transmit Enable", NULL,    0L,            NULL, NULL, 
  1093. !     NM_SUB,      "Toggle",              "T",    CHECKIT,    NULL, (void *) S_TOGGLE,
  1094. !     NM_SUB,      "Hold to Transmit", "H",    CHECKIT,    NULL, (void *) S_HOLD,
  1095. !     NM_ITEM,  "Line Gain",         NULL,    0L,            NULL, NULL, 
  1096. !     NM_SUB,      "Raise",              "]",    0L,            NULL, (void *) S_RAISELINEGAIN,
  1097. !     NM_SUB,      "Lower",              "[",    0L,            NULL, (void *) S_LOWERLINEGAIN,
  1098. !     NM_ITEM,  "Microphone Gain", NULL,    0L,            NULL, NULL,
  1099. !     NM_SUB,      "+20 dB",              "}",    CHECKIT,    NULL, (void *) S_TWENTYMICGAIN,
  1100. !     NM_SUB,      "+0 dB",              "{",    CHECKIT,    NULL, (void *) S_ZEROMICGAIN,    
  1101. !     NM_ITEM,  "Digital Amplify", NULL,    0L,            NULL, NULL,
  1102. !     NM_SUB,      "1X",                 NULL,    CHECKIT,    NULL, (void *) S_AMPONE,
  1103. !     NM_SUB,      "2X",                 NULL,    CHECKIT,    NULL, (void *) S_AMPTWO,
  1104. !     NM_SUB,      "4X",                 NULL,    CHECKIT,    NULL, (void *) S_AMPFOUR,
  1105. !     NM_ITEM,  "Input Channel",     NULL,    0L,            NULL, NULL,        
  1106. !     NM_SUB,      "Left",              "L",    CHECKIT,    NULL, (void *) S_LEFTCHANNEL,
  1107. !     NM_SUB,      "Right",              "R",    CHECKIT,    NULL, (void *) S_RIGHTCHANNEL,
  1108. !     NM_ITEM,  "Input Source",     NULL,    0L,            NULL, NULL, 
  1109. !     NM_SUB,      "",                  "-",    CHECKIT,    NULL, (void *) S_INPUTSRC0,
  1110. !     NM_SUB,      "",                  "=",    CHECKIT,    NULL, (void *) S_INPUTSRC1,
  1111. !     NM_SUB,      "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC2,
  1112. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC3,
  1113. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC4,
  1114. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC5,
  1115. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC6,
  1116. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC7,
  1117. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC8,
  1118. !     NM_SUB,   "",                 NULL,    CHECKIT,    NULL, (void *) S_INPUTSRC9,
  1119. !     NM_ITEM,  "Enable on Connect","X",    CHECKIT,    NULL, (void *) S_ENABLEONCONN,
  1120. !     NM_ITEM,  "Xmit on Play",      "Y",    CHECKIT,    NULL, (void *) S_XMITONPLAY,
  1121. !     NM_ITEM,  "TCP Batch Xmit",      "B",    CHECKIT,    NULL, (void *) S_TCPBATCHXMIT,
  1122. !     NM_END,      NULL,                 NULL,    NULL,        NULL, NULL
  1123.   };
  1124.   
  1125. + /* inputs */
  1126. + char input0[40] = "";
  1127. + char input1[40] = "";
  1128. + char input2[40] = "";
  1129. + char input3[40] = "";
  1130. + char input4[40] = "";
  1131. + char input5[40] = "";
  1132. + char input6[40] = "";
  1133. + char input7[40] = "";
  1134. + char input8[40] = "";
  1135. + char input9[40] = "";
  1136. + char *inputtxts[] =
  1137. + {
  1138. +     input0,
  1139. +     input1,
  1140. +     input2,
  1141. +     input3,
  1142. +     input4,
  1143. +     input5,
  1144. +     input6,
  1145. +     input7,
  1146. +     input8,
  1147. +     input9,
  1148. + };
  1149.   
  1150.   /* private functions */
  1151. ***************
  1152. *** 215,219 ****
  1153.   
  1154.   /* private file-global data */
  1155. ! static char [] = VERSION_STRING;
  1156.   static struct AmiPhoneInfo defMsg;
  1157.   static char szExitMessage[50] = "Error Initializing";
  1158. --- 251,255 ----
  1159.   
  1160.   /* private file-global data */
  1161. ! static char my_version[] = AMIPHONE_VERSION;
  1162.   static struct AmiPhoneInfo defMsg;
  1163.   static char szExitMessage[50] = "Error Initializing";
  1164. ***************
  1165. *** 224,228 ****
  1166.   static char * szPhoneFileName = NULL;
  1167.   static char szWinTitle[130] = "";
  1168. ! static struct Gadget *glist=NULL, *gad=NULL, *freqslider=NULL, *volslider=NULL, *delayslider=NULL;
  1169.   static struct NewGadget ng;
  1170.   static struct MsgPort * AppWindowPort = NULL;
  1171. --- 260,264 ----
  1172.   static char * szPhoneFileName = NULL;
  1173.   static char szWinTitle[130] = "";
  1174. ! static struct Gadget *glist=NULL, *gad=NULL, *volslider=NULL, *delayslider=NULL;
  1175.   static struct NewGadget ng;
  1176.   static struct MsgPort * AppWindowPort = NULL;
  1177. ***************
  1178. *** 232,236 ****
  1179.   
  1180.   /* global vars */
  1181. ! struct AmiPhoneInfo * daemonInfo = &defMsg;        
  1182.   
  1183.   /* AHI stuff? */
  1184. --- 268,275 ----
  1185.   
  1186.   /* global vars */
  1187. ! struct AmiPhoneInfo * daemonInfo = &defMsg;
  1188. ! struct Gadget *freqslider=NULL;
  1189. ! BOOL BUpdateMenus = TRUE;
  1190.   
  1191.   /* AHI stuff? */
  1192. ***************
  1193. *** 247,251 ****
  1194.   struct Library * RexxSysBase   = NULL;
  1195.   struct Library * TimerBase     = NULL;
  1196. ! struct Library * IntuitionBase = NULL;
  1197.   struct Library * SocketBase    = NULL;
  1198.   struct Library * GraphicsBase  = NULL;
  1199. --- 286,290 ----
  1200.   struct Library * RexxSysBase   = NULL;
  1201.   struct Library * TimerBase     = NULL;
  1202. ! struct IntuitionBase * IntuitionBase = NULL;
  1203.   struct Library * SocketBase    = NULL;
  1204.   struct Library * GraphicsBase  = NULL;
  1205. ***************
  1206. *** 255,259 ****
  1207.   struct Library * WorkbenchBase = NULL;
  1208.   struct Library * DiskFontBase  = NULL;
  1209. - extern struct Library * DelfinaBase;
  1210.   
  1211.   struct Library * MiscBase      = NULL;    /* this one not alloced with the others... */
  1212. --- 294,297 ----
  1213. ***************
  1214. *** 299,302 ****
  1215. --- 337,341 ----
  1216.   char * pszCallNames[] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
  1217.   char * pszCallIPs[]   = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
  1218. + ULONG ulAHIMode = AHI_DEFAULT_ID;
  1219.   int windowtop=-1, windowleft=-1, nSendPri = 999, nReceivePri = 1, nToggleMode = TOGGLE_TOGGLE, nSampleTechnique = TECHNIQUE_HARDINT;
  1220.   ULONG ulSampleArraySize; 
  1221. ***************
  1222. *** 327,336 ****
  1223.   extern struct IntInfo IntData;
  1224.   extern BYTE sighalf, sigfull;
  1225. ! extern __chip unsigned short microphone_image[];
  1226.   extern UBYTE * pubAllocedArray, * pubRightBuffer;
  1227.   extern struct AmiPhonePacketHeader * TransmitPacket[2];
  1228.   extern LONG sTCPSocket;
  1229. ! extern char szLastMemoFile[200] = "(unset)";
  1230. ! extern int delfsig, nMicGainValue;
  1231.   
  1232.   /* Data to use after we get a CTRL-F from the Toccata Capture interrupt */
  1233. --- 366,375 ----
  1234.   extern struct IntInfo IntData;
  1235.   extern BYTE sighalf, sigfull;
  1236. ! extern CHIP unsigned short microphone_image[];
  1237.   extern UBYTE * pubAllocedArray, * pubRightBuffer;
  1238.   extern struct AmiPhonePacketHeader * TransmitPacket[2];
  1239.   extern LONG sTCPSocket;
  1240. ! extern char szLastMemoFile[200]; /* = "(unset)"; */
  1241. ! extern int nMicGainValue;
  1242.   
  1243.   /* Data to use after we get a CTRL-F from the Toccata Capture interrupt */
  1244. ***************
  1245. *** 363,368 ****
  1246.   BOOL UsesCIAInterrupt(void)
  1247.   {
  1248. !     return((ubSamplerType != SAMPLER_DELFINA) &&
  1249. !            (ubSamplerType != SAMPLER_AHI) &&
  1250.              (ubSamplerType != SAMPLER_TOCCATA));
  1251.   }
  1252. --- 402,406 ----
  1253.   BOOL UsesCIAInterrupt(void)
  1254.   {
  1255. !     return((ubSamplerType != SAMPLER_AHI) &&
  1256.              (ubSamplerType != SAMPLER_TOCCATA));
  1257.   }
  1258. ***************
  1259. *** 377,381 ****
  1260.       return((ubSamplerType == SAMPLER_PERFECT) ||
  1261.              (ubSamplerType == SAMPLER_TOCCATA) ||
  1262. -            (ubSamplerType == SAMPLER_DELFINA) ||
  1263.              (ubSamplerType == SAMPLER_GVPDSS8));
  1264.   }
  1265. --- 415,418 ----
  1266. ***************
  1267. *** 383,388 ****
  1268.   BOOL CanAdjustMicGain(void)
  1269.   {
  1270. !     return((ubSamplerType == SAMPLER_TOCCATA) ||
  1271. !            (ubSamplerType == SAMPLER_DELFINA));
  1272.   }
  1273.   
  1274. --- 420,424 ----
  1275.   BOOL CanAdjustMicGain(void)
  1276.   {
  1277. !     return((ubSamplerType == SAMPLER_TOCCATA));
  1278.   }
  1279.   
  1280. ***************
  1281. *** 391,396 ****
  1282.       return((ubSamplerType == SAMPLER_SOMAGIC) ||
  1283.              (ubSamplerType == SAMPLER_CUSTOM)  ||
  1284. !            (ubSamplerType == SAMPLER_DELFINA) ||
  1285. !            (ubSamplerType == SAMPLER_TOCCATA));
  1286.   }
  1287.   
  1288. --- 427,432 ----
  1289.       return((ubSamplerType == SAMPLER_SOMAGIC) ||
  1290.              (ubSamplerType == SAMPLER_CUSTOM)  ||
  1291. !            (ubSamplerType == SAMPLER_TOCCATA) ||
  1292. !            (ubSamplerType == SAMPLER_AHI));
  1293.   }
  1294.   
  1295. ***************
  1296. *** 402,405 ****
  1297. --- 438,460 ----
  1298.   
  1299.   
  1300. + LONG SAVEDS STDARGS FreqSliderFunc(struct Gadget *gadget, WORD level)
  1301. + {
  1302. +     if((gadget != freqslider) || (AHIBase == NULL) || (ubSamplerType != SAMPLER_AHI))
  1303. +     {
  1304. +         return level;
  1305. +     }
  1306. +     else
  1307. +     {
  1308. +         ULONG freq = 0;
  1309. +         
  1310. +         AHI_GetAudioAttrs(ulAHIMode, NULL,
  1311. +             AHIDB_FrequencyArg,    level,
  1312. +             AHIDB_Frequency,    &freq,
  1313. +             TAG_DONE);
  1314. +         return freq;
  1315. +     }
  1316. + }
  1317.   
  1318.   BOOL AllocSliders(BOOL BAlloc)
  1319. ***************
  1320. *** 451,454 ****
  1321. --- 506,510 ----
  1322.               GTSL_Level,        (WORD)ulBytesPerSecond,
  1323.               GTSL_LevelFormat,     szLevelString1,
  1324. +             GTSL_DispFunc,        FreqSliderFunc,
  1325.               GTSL_LevelPlace,    PLACETEXT_RIGHT,
  1326.               GTSL_MaxLevelLen,    7+(nMaxSampleRate >= 10000)+(BPropFont*2),
  1327. ***************
  1328. *** 561,567 ****
  1329.       if (strcmp(szParam,"AURA") == 0)    return(SAMPLER_AURA);
  1330.   
  1331. -     /* Delfina board. */
  1332. -     if ((DelfinaBase)&&(strcmp(szParam,"DELFINA") == 0)) return(SAMPLER_DELFINA);
  1333.       /* The AHI Device sound API */
  1334.       if ((AHIBase)&&(strncmp(szParam,"AHI",3) == 0))  return(SAMPLER_AHI);
  1335. --- 617,620 ----
  1336. ***************
  1337. *** 587,591 ****
  1338.           case SAMPLER_SOMAGIC:    szType = "SOUNDMAGIC"; break;
  1339.           case SAMPLER_AURA:    szType = "AURA";    break;
  1340. -         case SAMPLER_DELFINA:    szType = "DELFINA"; break;
  1341.           case SAMPLER_AHI:    szType = "AHI";        break;
  1342.       }
  1343. --- 640,643 ----
  1344. ***************
  1345. *** 794,805 ****
  1346. --- 846,934 ----
  1347.   BOOL CreatePhoneMenus(BOOL BCreate)
  1348.   {   
  1349. +     struct NewMenu *newmenu;
  1350. +     ULONG inputs = 0;
  1351.       void * VisualInfo = NULL;
  1352.   
  1353.       if (BCreate == FALSE) 
  1354.       {
  1355. +         if(PhoneWindow) ClearMenuStrip(PhoneWindow);
  1356.           if (Menu) {FreeMenus(Menu); Menu = NULL;}
  1357.           return(TRUE);
  1358.       }
  1359.   
  1360. +     if(ubSamplerType == SAMPLER_AHI && AHIBase != NULL)
  1361. +     {
  1362. +         AHI_GetAudioAttrs(ulAHIMode, NULL,
  1363. +             AHIDB_Inputs,    &inputs,
  1364. +             TAG_DONE);
  1365. +     }
  1366. +     else
  1367. +     {
  1368. +         inputs = 2;
  1369. +     }
  1370. +     newmenu = nmMenus;
  1371. +     while(newmenu->nm_Type != NM_END)
  1372. +     {
  1373. +         int i;
  1374. +     
  1375. +         switch((ULONG) newmenu->nm_UserData)
  1376. +         {
  1377. +             case S_INPUTSRC0:
  1378. +             case S_INPUTSRC1:
  1379. +             case S_INPUTSRC2:
  1380. +             case S_INPUTSRC3:
  1381. +             case S_INPUTSRC4:
  1382. +             case S_INPUTSRC5:
  1383. +             case S_INPUTSRC6:
  1384. +             case S_INPUTSRC7:
  1385. +             case S_INPUTSRC8:
  1386. +             case S_INPUTSRC9:
  1387. +                 i = ((ULONG) newmenu->nm_UserData - S_INPUTSRC0);
  1388. +                 
  1389. +                 if(i < inputs)
  1390. +                 {
  1391. +                     if(ubSamplerType == SAMPLER_AHI && AHIBase != NULL)
  1392. +                     {
  1393. +                         AHI_GetAudioAttrs(ulAHIMode, NULL,
  1394. +                             AHIDB_BufferLen,    40,
  1395. +                             AHIDB_InputArg,        i,
  1396. +                             AHIDB_Input,        inputtxts[i],
  1397. +                             TAG_DONE);
  1398. +                         newmenu->nm_Label = inputtxts[i];
  1399. +                     }
  1400. +                     else
  1401. +                     {
  1402. +                         if(i == 0) newmenu->nm_Label = "Microphone";
  1403. +                         else if(i == 1) newmenu->nm_Label = "Line";
  1404. +                         else newmenu->nm_Label = "????";
  1405. +                     }
  1406. +                     newmenu->nm_Type  &= ~NM_IGNORE;
  1407. +                     newmenu->nm_Flags &= ~NM_ITEMDISABLED;
  1408. +                 }
  1409. +                 else
  1410. +                 {
  1411. +                     newmenu->nm_Type  |= NM_IGNORE;
  1412. +                     newmenu->nm_Label = "";
  1413. +                     newmenu->nm_Flags |= NM_ITEMDISABLED;
  1414. +                 }
  1415. +                 if(i == 0 && inputs == 0)
  1416. +                 {
  1417. +                     newmenu->nm_Label = "None";
  1418. +                     newmenu->nm_Type  &= ~NM_IGNORE;
  1419. +                     newmenu->nm_Flags &= ~NM_ITEMDISABLED;
  1420. +                 }
  1421. +                 break;
  1422. +         }
  1423. +         newmenu++;
  1424. +     }
  1425.       /* Create menus */
  1426.       UNLESS(Menu = CreateMenus(nmMenus, TAG_DONE))
  1427. ***************
  1428. *** 815,819 ****
  1429.       }
  1430.       
  1431. !     if (LayoutMenus(Menu, VisualInfo, TAG_DONE))
  1432.       {
  1433.           SetMenuStrip(PhoneWindow, Menu);
  1434. --- 944,948 ----
  1435.       }
  1436.       
  1437. !     if (LayoutMenus(Menu, VisualInfo, GTMN_NewLookMenus, TRUE, TAG_DONE))
  1438.       {
  1439.           SetMenuStrip(PhoneWindow, Menu);
  1440. ***************
  1441. *** 826,829 ****
  1442. --- 955,961 ----
  1443.       }
  1444.       FreeVisualInfo(VisualInfo);
  1445. +     SetMenuValues();
  1446.       return(TRUE);
  1447.   }
  1448. ***************
  1449. *** 881,885 ****
  1450.       const int diff = 'a' - 'A';
  1451.   
  1452. !     UNLESS(sOldString) return();
  1453.       
  1454.       while (*i != '\0')
  1455. --- 1013,1017 ----
  1456.       const int diff = 'a' - 'A';
  1457.   
  1458. !     UNLESS(sOldString) return;
  1459.       
  1460.       while (*i != '\0')
  1461. ***************
  1462. *** 897,901 ****
  1463.       const int diff = 'a' - 'A';
  1464.   
  1465. !     UNLESS(sOldString) return();
  1466.       while (*i != '\0')
  1467.        {
  1468. --- 1029,1033 ----
  1469.       const int diff = 'a' - 'A';
  1470.   
  1471. !     UNLESS(sOldString) return;
  1472.       while (*i != '\0')
  1473.        {
  1474. ***************
  1475. *** 972,987 ****
  1476.                 UNCHECKSUB;
  1477.             }
  1478. -     NEXTSUB;  if (DelfinaBase)
  1479. -           {
  1480. -               ENABLESUB;
  1481. -               if (ubSamplerType == SAMPLER_DELFINA) CHECKSUB; else UNCHECKSUB;
  1482. -           }
  1483. -           else
  1484. -           {
  1485. -               DISABLESUB;
  1486. -               UNCHECKSUB;
  1487. -           }
  1488.       NEXTSUB;  if (ubSamplerType == SAMPLER_CUSTOM)  CHECKSUB; else UNCHECKSUB;
  1489.       NEXTSUB;  if (ubSamplerType == SAMPLER_GENERIC) CHECKSUB; else UNCHECKSUB;
  1490.   
  1491.       /* compression submenu */
  1492. --- 1104,1112 ----
  1493.                 UNCHECKSUB;
  1494.             }
  1495.       NEXTSUB;  if (ubSamplerType == SAMPLER_CUSTOM)  CHECKSUB; else UNCHECKSUB;
  1496.       NEXTSUB;  if (ubSamplerType == SAMPLER_GENERIC) CHECKSUB; else UNCHECKSUB;
  1497. +     NEXTSUB;  /* BARLABEL */
  1498. +     NEXTSUB;  if (ubSamplerType == SAMPLER_AHI) ENABLESUB; else DISABLESUB;
  1499.   
  1500.       /* compression submenu */
  1501. ***************
  1502. *** 1017,1022 ****
  1503.       /* Input source submenu */
  1504.       NEXTITEM; if (CanAdjustInputSource()) ENABLEITEM; else DISABLEITEM;
  1505. !     FIRSTSUB; if (ubInputSource == INPUT_SOURCE_MIC) CHECKSUB; else UNCHECKSUB;
  1506. !     NEXTSUB;  if (ubInputSource == INPUT_SOURCE_EXT) CHECKSUB; else UNCHECKSUB;
  1507.       
  1508.       /* Xmit on connect */
  1509. --- 1142,1152 ----
  1510.       /* Input source submenu */
  1511.       NEXTITEM; if (CanAdjustInputSource()) ENABLEITEM; else DISABLEITEM;
  1512. !     FIRSTSUB; if (ubInputSource == INPUT_SOURCE_0) CHECKSUB; else UNCHECKSUB;
  1513. !     for (i=1;i<10;i++) 
  1514. !     {
  1515. !         if(currentSub->NextItem == NULL) break;
  1516. !         NEXTSUB;  if (ubInputSource == i) CHECKSUB; else UNCHECKSUB;
  1517. !     }
  1518.       
  1519.       /* Xmit on connect */
  1520. ***************
  1521. *** 1149,1153 ****
  1522.                   {
  1523.                       case FREQ_SLIDER:
  1524. !                         /* everything is done below for us! */
  1525.                           break;
  1526.                           
  1527. --- 1279,1296 ----
  1528.                   {
  1529.                       case FREQ_SLIDER:
  1530. !                         if((AHIBase == NULL) || (ubSamplerType != SAMPLER_AHI))
  1531. !                         {
  1532. !                             /* everything is done below for us! */
  1533. !                         }
  1534. !                         else
  1535. !                         {
  1536. !                             LONG freq = 0;
  1537. !                             AHI_GetAudioAttrs(ulAHIMode, NULL,
  1538. !                                 AHIDB_FrequencyArg,    code,
  1539. !                                 AHIDB_Frequency,    &freq,
  1540. !                                 TAG_DONE);
  1541. !                             code = freq;
  1542. !                         }
  1543.                           break;
  1544.                           
  1545. ***************
  1546. *** 1163,1168 ****
  1547.                           break;
  1548.                   }
  1549. !                 GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,GTSL_Level, 
  1550. !                        ChangeSampleSpeed(code,ubCurrComp), TAG_END);
  1551.                   break;
  1552.   
  1553. --- 1306,1328 ----
  1554.                           break;
  1555.                   }
  1556. !                 if((AHIBase == NULL) || (ubSamplerType != SAMPLER_AHI))
  1557. !                 {
  1558. !                     GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,GTSL_Level, 
  1559. !                            ChangeSampleSpeed(code,ubCurrComp), TAG_END);
  1560. !                 }
  1561. !                 else
  1562. !                 {
  1563. !                     LONG index = 0;
  1564. !                     AHI_GetAudioAttrs(ulAHIMode, NULL,
  1565. !                         AHIDB_IndexArg,    ChangeSampleSpeed(code,ubCurrComp),
  1566. !                         AHIDB_Index,    &index,
  1567. !                         TAG_DONE);
  1568. !                     GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,GTSL_Level, 
  1569. !                            index, TAG_END);
  1570. !                 }
  1571.                   break;
  1572.   
  1573. ***************
  1574. *** 1183,1187 ****
  1575.               case IDCMP_CLOSEWINDOW: 
  1576.                   SetExitMessage("Window Closed",0);
  1577. !                 BProgramDone = TRUE;  
  1578.                   break;
  1579.                   
  1580. --- 1343,1347 ----
  1581.               case IDCMP_CLOSEWINDOW: 
  1582.                   SetExitMessage("Window Closed",0);
  1583. !                 BProgramDone = TRUE;
  1584.                   break;
  1585.                   
  1586. ***************
  1587. *** 1222,1225 ****
  1588. --- 1382,1436 ----
  1589.                       }
  1590.                   }
  1591. +                 else if (ubSamplerType == SAMPLER_AHI)
  1592. +                 {
  1593. +                     LONG index = 0, freqs = 0, freq = 0;
  1594. +                     AHI_GetAudioAttrs(ulAHIMode, NULL,
  1595. +                         AHIDB_IndexArg,        ulBytesPerSecond,
  1596. +                         AHIDB_Index,        &index,
  1597. +                         AHIDB_Frequencies,    &freqs,
  1598. +                         TAG_DONE);
  1599. +                     if ((code == '.')||(code == '>'))
  1600. +                     {
  1601. +                         if(index < (freqs - 1))
  1602. +                         {
  1603. +                             index++;
  1604. +                         }
  1605. +                         AHI_GetAudioAttrs(ulAHIMode, NULL,
  1606. +                             AHIDB_FrequencyArg,    index,
  1607. +                             AHIDB_Frequency,    &freq,
  1608. +                             TAG_DONE);
  1609. +                         if(freq <= nMaxSampleRate)
  1610. +                         {
  1611. +                             ChangeSampleSpeed(freq, ubCurrComp);
  1612. +                             GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,
  1613. +                                 GTSL_Level, index,
  1614. +                                 TAG_END);
  1615. +                         }
  1616. +                     }
  1617. +                     if ((code == ',')||(code == '<'))
  1618. +                     {
  1619. +                         if(index > 0)
  1620. +                         {
  1621. +                             index--;
  1622. +                         }
  1623. +                         AHI_GetAudioAttrs(ulAHIMode, NULL,
  1624. +                             AHIDB_FrequencyArg,    index,
  1625. +                             AHIDB_Frequency,    &freq,
  1626. +                             TAG_DONE);
  1627. +                         ChangeSampleSpeed(freq, ubCurrComp);
  1628. +                         GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,
  1629. +                             GTSL_Level, index,
  1630. +                             TAG_END);
  1631. +                     }
  1632. +                 }
  1633.                   else
  1634.                   {
  1635. ***************
  1636. *** 1258,1262 ****
  1637.                           case M_RECORDMEMO:    StartRecording(fpMemo == NULL,NULL);break;
  1638.                           case S_DSS8:        ChangeSamplerType(SAMPLER_GVPDSS8); break;
  1639. !                         case S_PERFECTSOUND:    ChangeSamplerType(SAMPLER_PERFECT); break;
  1640.                           case S_AMAS:        ChangeSamplerType(SAMPLER_AMAS);    break;
  1641.                           case S_TOCCATA:        ChangeSamplerType(SAMPLER_TOCCATA); break;
  1642. --- 1469,1473 ----
  1643.                           case M_RECORDMEMO:    StartRecording(fpMemo == NULL,NULL);break;
  1644.                           case S_DSS8:        ChangeSamplerType(SAMPLER_GVPDSS8); break;
  1645. !                         case S_PERFECTSOUND:ChangeSamplerType(SAMPLER_PERFECT); break;
  1646.                           case S_AMAS:        ChangeSamplerType(SAMPLER_AMAS);    break;
  1647.                           case S_TOCCATA:        ChangeSamplerType(SAMPLER_TOCCATA); break;
  1648. ***************
  1649. *** 1264,1270 ****
  1650.                           case S_GENERIC:        ChangeSamplerType(SAMPLER_GENERIC); break;
  1651.                           case S_AURA:        ChangeSamplerType(SAMPLER_AURA);    break;
  1652. !                         case S_AHI:        ChangeSamplerType(SAMPLER_AHI);     break;
  1653. !                         case S_DELFINA:        ChangeSamplerType(SAMPLER_DELFINA); break;
  1654.                           case S_SOMAGIC:        ChangeSamplerType(SAMPLER_SOMAGIC); break;
  1655.                           case S_ADPCM2:        ChangeCompressMode(COMPRESS_ADPCM2);break;
  1656.                           case S_ADPCM3:        ChangeCompressMode(COMPRESS_ADPCM3);break;
  1657. --- 1475,1481 ----
  1658.                           case S_GENERIC:        ChangeSamplerType(SAMPLER_GENERIC); break;
  1659.                           case S_AURA:        ChangeSamplerType(SAMPLER_AURA);    break;
  1660. !                         case S_AHI:            ChangeSamplerType(SAMPLER_AHI);     break;
  1661.                           case S_SOMAGIC:        ChangeSamplerType(SAMPLER_SOMAGIC); break;
  1662. +                         case S_AHIMODE:        ChangeAHIMode();                    break;
  1663.                           case S_ADPCM2:        ChangeCompressMode(COMPRESS_ADPCM2);break;
  1664.                           case S_ADPCM3:        ChangeCompressMode(COMPRESS_ADPCM3);break;
  1665. ***************
  1666. *** 1272,1281 ****
  1667.                           case S_TOGGLE:        nToggleMode = TOGGLE_TOGGLE;    break;
  1668.                           case S_HOLD:        nToggleMode = TOGGLE_HOLD; ToggleMicButton(CODE_OFF); break;
  1669. !                         case S_ENABLEONCONN:    BEnableOnConnect = Not[BEnableOnConnect];       break;
  1670.                           case S_XMITONPLAY:    BXmitOnPlay      = Not[BXmitOnPlay];       break;
  1671. !                         case S_TCPBATCHXMIT:    BTCPBatchXmit    = Not[BTCPBatchXmit]; break;
  1672. !                         case S_RAISELINEGAIN:    RaiseLineGain(1);             break;
  1673. !                         case S_LOWERLINEGAIN:    RaiseLineGain(-1);                break;
  1674. !                         case S_TWENTYMICGAIN:   SetMicGain(20);                 break;
  1675.                           case S_ZEROMICGAIN:    SetMicGain(0);                 break;
  1676.                           case S_AMPONE:        nAmpShift = 0; IntData.ulShiftLeft = 0L; break;
  1677. --- 1483,1492 ----
  1678.                           case S_TOGGLE:        nToggleMode = TOGGLE_TOGGLE;    break;
  1679.                           case S_HOLD:        nToggleMode = TOGGLE_HOLD; ToggleMicButton(CODE_OFF); break;
  1680. !                         case S_ENABLEONCONN:BEnableOnConnect = Not[BEnableOnConnect];       break;
  1681.                           case S_XMITONPLAY:    BXmitOnPlay      = Not[BXmitOnPlay];       break;
  1682. !                         case S_TCPBATCHXMIT:BTCPBatchXmit    = Not[BTCPBatchXmit]; break;
  1683. !                         case S_RAISELINEGAIN:RaiseLineGain(1);             break;
  1684. !                         case S_LOWERLINEGAIN:RaiseLineGain(-1);                break;
  1685. !                         case S_TWENTYMICGAIN:SetMicGain(20);             break;
  1686.                           case S_ZEROMICGAIN:    SetMicGain(0);                 break;
  1687.                           case S_AMPONE:        nAmpShift = 0; IntData.ulShiftLeft = 0L; break;
  1688. ***************
  1689. *** 1283,1289 ****
  1690.                           case S_AMPFOUR:        nAmpShift = 2; IntData.ulShiftLeft = 2L; break;
  1691.                           case S_LEFTCHANNEL:    ChangeInputChannel(INPUT_JACK_LEFT); break;
  1692. !                         case S_RIGHTCHANNEL:    ChangeInputChannel(INPUT_JACK_RIGHT); break;
  1693. !                         case S_INPUTMIC:        ChangeInputSource(INPUT_SOURCE_MIC,TRUE); break;
  1694. !                         case S_INPUTEXT:        ChangeInputSource(INPUT_SOURCE_EXT,TRUE); break;
  1695.                           default:         
  1696.                               if ((ulItemCode >= T_CONNECTTO)&&(ulItemCode <= T_CONNECTTO+9))
  1697. --- 1494,1508 ----
  1698.                           case S_AMPFOUR:        nAmpShift = 2; IntData.ulShiftLeft = 2L; break;
  1699.                           case S_LEFTCHANNEL:    ChangeInputChannel(INPUT_JACK_LEFT); break;
  1700. !                         case S_RIGHTCHANNEL:ChangeInputChannel(INPUT_JACK_RIGHT); break;
  1701. !                         case S_INPUTSRC0:
  1702. !                         case S_INPUTSRC1:
  1703. !                         case S_INPUTSRC2:
  1704. !                         case S_INPUTSRC3:
  1705. !                         case S_INPUTSRC4:
  1706. !                         case S_INPUTSRC5:
  1707. !                         case S_INPUTSRC6:
  1708. !                         case S_INPUTSRC7:
  1709. !                         case S_INPUTSRC8:
  1710. !                         case S_INPUTSRC9:   ChangeInputSource(ulItemCode-S_INPUTSRC0,TRUE); break;
  1711.                           default:         
  1712.                               if ((ulItemCode >= T_CONNECTTO)&&(ulItemCode <= T_CONNECTTO+9))
  1713. ***************
  1714. *** 1297,1300 ****
  1715. --- 1516,1520 ----
  1716.                       code = (message == fakeMessage) ? MENUNULL : mItem->NextSelect;
  1717.                   }
  1718.                   SetMenuValues();
  1719.                   break;
  1720. ***************
  1721. *** 1326,1329 ****
  1722. --- 1546,1561 ----
  1723.           message = (struct IntuiMessage *)GT_GetIMsg(PhoneWindow->UserPort);
  1724.       }
  1725. +     if(BUpdateMenus)
  1726. +     {
  1727. +         BUpdateMenus = FALSE;
  1728. +         CreatePhoneMenus(FALSE);
  1729. +         UNLESS(CreatePhoneMenus(TRUE))
  1730. +         {
  1731. +             SetExitMessage("Couldn't Create Menus!",RETURN_ERROR);
  1732. +             BProgramDone = TRUE;
  1733. +         }
  1734. +     }
  1735.       return(BProgramDone);
  1736.   }
  1737. ***************
  1738. *** 1350,1355 ****
  1739.           RexxSysBase   = OpenLibrary("rexxsyslib.library", 36L);
  1740.           
  1741. -         InitDelfina();    /* On success of this function, DelfinaBase is set to non-NULL */
  1742. -         
  1743.           AllocAHI(TRUE);
  1744.       }
  1745. --- 1582,1585 ----
  1746. ***************
  1747. *** 1357,1361 ****
  1748.       {
  1749.           AllocAHI(FALSE);
  1750. -         if (DelfinaBase)     CleanupDelfina();
  1751.           if (ToccataBase)     CloseLibrary(ToccataBase);
  1752.           if (WorkbenchBase)     CloseLibrary(WorkbenchBase);
  1753. --- 1587,1590 ----
  1754. ***************
  1755. *** 1514,1524 ****
  1756.           Forbid();
  1757.           while(amsg = (struct AppMessage *) GetMsg(AppWindowPort)) ReplyMsg(amsg);
  1758. !          Permit();
  1759. !          DeleteMsgPort(AppWindowPort);
  1760. !      }
  1761. !      
  1762. !     if (PhoneWindow) CloseWindow(PhoneWindow);
  1763. !     
  1764.       CreatePhoneMenus(FALSE);        
  1765.       AllocSliders(FALSE);    
  1766.       if (Scr) UnlockPubScreen(NULL,Scr);
  1767. --- 1743,1757 ----
  1768.           Forbid();
  1769.           while(amsg = (struct AppMessage *) GetMsg(AppWindowPort)) ReplyMsg(amsg);
  1770. !         Permit();
  1771. !         DeleteMsgPort(AppWindowPort);
  1772. !     }
  1773.       CreatePhoneMenus(FALSE);        
  1774. +     if (PhoneWindow)
  1775. +     {
  1776. +         CloseWindow(PhoneWindow);
  1777. +     }
  1778. +     
  1779.       AllocSliders(FALSE);    
  1780.       if (Scr) UnlockPubScreen(NULL,Scr);
  1781. ***************
  1782. *** 1531,1535 ****
  1783.       {
  1784.           if (pszCallNames[i]) FreeMem(pszCallNames[i],strlen(pszCallNames[i])+1);
  1785. !         if (pszCallIPs[i])   FreeMem(pszCallIPs[i],  strlen(pszCallIPs[i])  +1);
  1786.   
  1787.       }
  1788. --- 1764,1768 ----
  1789.       {
  1790.           if (pszCallNames[i]) FreeMem(pszCallNames[i],strlen(pszCallNames[i])+1);
  1791. !         if (pszCallIPs[i])     FreeMem(pszCallIPs[i],     strlen(pszCallIPs[i])    +1);
  1792.   
  1793.       }
  1794. ***************
  1795. *** 1546,1550 ****
  1796.   LONG ChopValue(LONG ulVal, LONG ulLow, LONG ulHigh)
  1797.   {
  1798. !     if (ulVal < ulLow)  ulVal = ulLow;
  1799.       if (ulVal > ulHigh) ulVal = ulHigh;
  1800.       return(ulVal);
  1801. --- 1779,1783 ----
  1802.   LONG ChopValue(LONG ulVal, LONG ulLow, LONG ulHigh)
  1803.   {
  1804. !     if (ulVal < ulLow)    ulVal = ulLow;
  1805.       if (ulVal > ulHigh) ulVal = ulHigh;
  1806.       return(ulVal);
  1807. ***************
  1808. *** 1661,1672 ****
  1809.       if (GetPhoneArg("SAMPLERATE", &nParam, &szParam))    ulBytesPerSecond = ChopValue(nParam,MIN_SAMPLE_RATE,nMaxSampleRate);
  1810.       if (GetPhoneArg("SAMPLER", &nParam, &szParam))       ubSamplerType    = ParseSamplerType(szParam);
  1811.       if (GetPhoneArg("INPUTCHANNEL", &nParam, &szParam))  ubInputChannel   = ParseInputChannel(szParam);
  1812.       if (GetPhoneArg("VOICEMAILDIR", &nParam, &szParam))  Strncpy(szVoiceMailDir,szParam,sizeof(szVoiceMailDir));
  1813. !         if (GetPhoneArg("INPUTSOURCE",&nParam,&szParam))
  1814. !         {
  1815. !             if (*szParam == 'M') ubInputSource = INPUT_SOURCE_MIC;
  1816. !             if (*szParam == 'L') ubInputSource = INPUT_SOURCE_EXT;
  1817. !         }
  1818. !         else if (ubSamplerType == SAMPLER_TOCCATA)
  1819.       {
  1820.           /* Try to get current input source setting from Toccata prefs */
  1821. --- 1894,1907 ----
  1822.       if (GetPhoneArg("SAMPLERATE", &nParam, &szParam))    ulBytesPerSecond = ChopValue(nParam,MIN_SAMPLE_RATE,nMaxSampleRate);
  1823.       if (GetPhoneArg("SAMPLER", &nParam, &szParam))       ubSamplerType    = ParseSamplerType(szParam);
  1824. +     if (GetPhoneArg("AHIMODE", &nParam, &szParam))       ulAHIMode        = nParam;
  1825.       if (GetPhoneArg("INPUTCHANNEL", &nParam, &szParam))  ubInputChannel   = ParseInputChannel(szParam);
  1826.       if (GetPhoneArg("VOICEMAILDIR", &nParam, &szParam))  Strncpy(szVoiceMailDir,szParam,sizeof(szVoiceMailDir));
  1827. !     if (GetPhoneArg("INPUTSOURCE",&nParam,&szParam))
  1828. !     {
  1829. !         if (*szParam == 'M') ubInputSource = INPUT_SOURCE_MIC;
  1830. !         else if (*szParam == 'L') ubInputSource = INPUT_SOURCE_EXT;
  1831. !         else ubInputSource = ChopValue(nParam,0,255);
  1832. !     }
  1833. !     else if (ubSamplerType == SAMPLER_TOCCATA)
  1834.       {
  1835.           /* Try to get current input source setting from Toccata prefs */
  1836. ***************
  1837. *** 1678,1688 ****
  1838.           T_GetPart(taglist);
  1839.           ubInputSource = (lInputSource == TINPUT_Mic) ? INPUT_SOURCE_MIC : INPUT_SOURCE_EXT;
  1840. !         }
  1841. !         if (GetPhoneArg("AMPLIFY",&nParam,&szParam))
  1842. !         {
  1843. !             if (*szParam == '1') nAmpShift = 0;
  1844. !             if (*szParam == '2') nAmpShift = 1;
  1845. !             if (*szParam == '4') nAmpShift = 2;
  1846. !         }
  1847.   
  1848.       BSuccess = GetPhoneArg("PUBSCREEN", &nParam, &szParam);
  1849. --- 1913,1923 ----
  1850.           T_GetPart(taglist);
  1851.           ubInputSource = (lInputSource == TINPUT_Mic) ? INPUT_SOURCE_MIC : INPUT_SOURCE_EXT;
  1852. !     }
  1853. !     if (GetPhoneArg("AMPLIFY",&nParam,&szParam))
  1854. !     {
  1855. !         if (*szParam == '1') nAmpShift = 0;
  1856. !         if (*szParam == '2') nAmpShift = 1;
  1857. !         if (*szParam == '4') nAmpShift = 2;
  1858. !     }
  1859.   
  1860.       BSuccess = GetPhoneArg("PUBSCREEN", &nParam, &szParam);
  1861. ***************
  1862. *** 1842,1891 ****
  1863.   
  1864.       BReturn = ((0==strcmp(szBuf,"TOP"))          ||
  1865. !           (0==strcmp(szBuf,"LEFT"))         ||
  1866. !           (0==strcmp(szBuf,"KEY"))          ||
  1867. !            (0==strcmp(szBuf,"PUBSCREEN"))     ||
  1868.              (0==strcmp(szBuf,"THRESHVOLUME"))     ||
  1869.                  (0==strcmp(szBuf,"MINVOLUME"))     ||
  1870. !            (0==strcmp(szBuf,"XMITDELAY"))     ||
  1871.              (0==strcmp(szBuf,"PACKETINTERVAL"))     ||
  1872. !            (0==strcmp(szBuf,"SAMPLERATE"))     ||
  1873.              (0==strcmp(szBuf,"ENABLEONCONNECT"))     ||
  1874.              (0==strcmp(szBuf,"XMITONCONNECT"))     ||
  1875. !              (0==strcmp(szBuf,"XMITONPLAY"))     ||
  1876.                (0==strcmp(szBuf,"TCPBATCHXMIT"))     ||
  1877. !            (0==strcmp(szBuf,"SENDPRI"))         ||
  1878. !            (0==strcmp(szBuf,"RECEIVEPRI"))     ||
  1879.              (0==strcmp(szBuf,"HOLDTOTRANSMIT"))     ||
  1880. !            (0==strcmp(szBuf,"COMPRESS"))     ||
  1881.              (0==strcmp(szBuf,"MAXBANDWIDTH"))     ||
  1882. !            (0==strcmp(szBuf,"CONNECT"))         ||
  1883.              (0==strcmp(szBuf,"SAMPLETECHNIQUE"))     ||
  1884.              (0==strcmp(szBuf,"MAXSAMPLERATE"))     ||
  1885.              (0==strcmp(szBuf,"INPUTCHANNEL"))     ||
  1886. !            (0==strcmp(szBuf,"SAMPLER"))         ||
  1887.              (0==strcmp(szBuf,"VOICEMAILDIR"))     ||
  1888.              (0==strcmp(szBuf,"INPUTSOURCE"))      ||
  1889.              (0==strcmp(szBuf,"AMPLIFY"))          ||
  1890. !            (0==strcmp(szBuf,"PUBSCREEN"))    ||
  1891.              (0==strcmp(szBuf,"PUBLICSCREEN"))     ||
  1892.              (0==strcmp(szBuf,"CUSTSTARTBITS"))    ||
  1893. !           (0==strcmp(szBuf,"CUSTDIRBITS"))     ||
  1894. !           (0==strcmp(szBuf,"CUSTLEFTBITS"))    ||
  1895.             (0==strcmp(szBuf,"CUSTRIGHTBITS"))    ||
  1896. !           (0==strcmp(szBuf,"CUSTEXTBITS"))    ||
  1897. !           (0==strcmp(szBuf,"CUSTSTOPBITS"))    ||
  1898. !           (0==strcmp(szBuf,"MAXXMITDELAY"))    ||
  1899. !           (0==strcmp(szBuf,"MICGAIN"))        ||
  1900. !           (0==strcmp(szBuf,"LINEGAIN"))        ||
  1901. !           (0==strcmp(szBuf,"IDLERATE"))        ||
  1902. !           (0==strncmp(szBuf,"PHONEBOOK",9))    ||
  1903.             (0==strcmp(szBuf,"CUSTSAMPLEADDRESS"))||
  1904.             (0==strcmp(szBuf,"MAXVOLBYTECOUNT"))  ||
  1905. !           (0==strcmp(szBuf,"HACKAMPVOL"))      ||
  1906. !           (0==strcmp(szBuf,"DEBUG"))          ||
  1907. !           (0==strcmp(szBuf,"FONT"))          ||
  1908. !           (0==strcmp(szBuf,"FONTSIZE"))      ||
  1909. !           (0==strcmp(szBuf,"PRESEND"))      ||
  1910. !           (0==strcmp(szBuf,"POSTSEND"))      ||
  1911.             (0==strcmp(szBuf,"CUSTMICBITS")));
  1912.   
  1913. --- 2077,2127 ----
  1914.   
  1915.       BReturn = ((0==strcmp(szBuf,"TOP"))          ||
  1916. !           (0==strcmp(szBuf,"LEFT"))                ||
  1917. !           (0==strcmp(szBuf,"KEY"))                ||
  1918. !            (0==strcmp(szBuf,"PUBSCREEN"))        ||
  1919.              (0==strcmp(szBuf,"THRESHVOLUME"))     ||
  1920.                  (0==strcmp(szBuf,"MINVOLUME"))     ||
  1921. !            (0==strcmp(szBuf,"XMITDELAY"))        ||
  1922.              (0==strcmp(szBuf,"PACKETINTERVAL"))     ||
  1923. !            (0==strcmp(szBuf,"SAMPLERATE"))        ||
  1924.              (0==strcmp(szBuf,"ENABLEONCONNECT"))     ||
  1925.              (0==strcmp(szBuf,"XMITONCONNECT"))     ||
  1926. !              (0==strcmp(szBuf,"XMITONPLAY"))        ||
  1927.                (0==strcmp(szBuf,"TCPBATCHXMIT"))     ||
  1928. !            (0==strcmp(szBuf,"SENDPRI"))            ||
  1929. !            (0==strcmp(szBuf,"RECEIVEPRI"))        ||
  1930.              (0==strcmp(szBuf,"HOLDTOTRANSMIT"))     ||
  1931. !            (0==strcmp(szBuf,"COMPRESS"))            ||
  1932.              (0==strcmp(szBuf,"MAXBANDWIDTH"))     ||
  1933. !            (0==strcmp(szBuf,"CONNECT"))            ||
  1934.              (0==strcmp(szBuf,"SAMPLETECHNIQUE"))     ||
  1935.              (0==strcmp(szBuf,"MAXSAMPLERATE"))     ||
  1936.              (0==strcmp(szBuf,"INPUTCHANNEL"))     ||
  1937. !            (0==strcmp(szBuf,"SAMPLER"))            ||
  1938. !            (0==strcmp(szBuf,"AHIMODE"))            ||
  1939.              (0==strcmp(szBuf,"VOICEMAILDIR"))     ||
  1940.              (0==strcmp(szBuf,"INPUTSOURCE"))      ||
  1941.              (0==strcmp(szBuf,"AMPLIFY"))          ||
  1942. !            (0==strcmp(szBuf,"PUBSCREEN"))        ||
  1943.              (0==strcmp(szBuf,"PUBLICSCREEN"))     ||
  1944.              (0==strcmp(szBuf,"CUSTSTARTBITS"))    ||
  1945. !           (0==strcmp(szBuf,"CUSTDIRBITS"))         ||
  1946. !           (0==strcmp(szBuf,"CUSTLEFTBITS"))        ||
  1947.             (0==strcmp(szBuf,"CUSTRIGHTBITS"))    ||
  1948. !           (0==strcmp(szBuf,"CUSTEXTBITS"))        ||
  1949. !           (0==strcmp(szBuf,"CUSTSTOPBITS"))        ||
  1950. !           (0==strcmp(szBuf,"MAXXMITDELAY"))        ||
  1951. !           (0==strcmp(szBuf,"MICGAIN"))            ||
  1952. !           (0==strcmp(szBuf,"LINEGAIN"))            ||
  1953. !           (0==strcmp(szBuf,"IDLERATE"))            ||
  1954. !           (0==strncmp(szBuf,"PHONEBOOK",9))        ||
  1955.             (0==strcmp(szBuf,"CUSTSAMPLEADDRESS"))||
  1956.             (0==strcmp(szBuf,"MAXVOLBYTECOUNT"))  ||
  1957. !           (0==strcmp(szBuf,"HACKAMPVOL"))          ||
  1958. !           (0==strcmp(szBuf,"DEBUG"))              ||
  1959. !           (0==strcmp(szBuf,"FONT"))              ||
  1960. !           (0==strcmp(szBuf,"FONTSIZE"))          ||
  1961. !           (0==strcmp(szBuf,"PRESEND"))          ||
  1962. !           (0==strcmp(szBuf,"POSTSEND"))          ||
  1963.             (0==strcmp(szBuf,"CUSTMICBITS")));
  1964.   
  1965. ***************
  1966. *** 2138,2142 ****
  1967.   
  1968.   /* This is where the Graphics Daemon starts executing at! */
  1969. ! __geta4 void GraphicsTaskMain(void)
  1970.   {
  1971.       /* Global data to be used by the graphics daemon ONLY */
  1972. --- 2374,2378 ----
  1973.   
  1974.   /* This is where the Graphics Daemon starts executing at! */
  1975. ! void SAVEDS GraphicsTaskMain(void)
  1976.   {
  1977.       /* Global data to be used by the graphics daemon ONLY */
  1978. ***************
  1979. *** 2357,2361 ****
  1980.          ((AHImp = CreateMsgPort()) && 
  1981.           (AHIio = (struct AHIRequest *)CreateIORequest(AHImp,sizeof(struct AHIRequest))) &&
  1982. !         (AHIio->ahir_Version = 1) &&
  1983.           ((AHIDevice = OpenDevice(AHINAME,AHI_NO_UNIT,(struct IORequest *)AHIio,0L)) == 0))
  1984.         {
  1985. --- 2593,2597 ----
  1986.          ((AHImp = CreateMsgPort()) && 
  1987.           (AHIio = (struct AHIRequest *)CreateIORequest(AHImp,sizeof(struct AHIRequest))) &&
  1988. !         (AHIio->ahir_Version = 4) &&
  1989.           ((AHIDevice = OpenDevice(AHINAME,AHI_NO_UNIT,(struct IORequest *)AHIio,0L)) == 0))
  1990.         {
  1991. ***************
  1992. *** 2477,2486 ****
  1993.       UWORD wZoomCoords[4];
  1994.   
  1995. -     /* Put this to a known state of non-allocation! */
  1996. -     DelfinaBase = NULL;
  1997. -         
  1998.       if ((BStartedFromWB == FALSE)&&(largc == 2)&&(*largv[1] == '?'))
  1999.       {
  2000. !         printf("Template:  AmiPhone PEERNAME/A,TOP/K/N,LEFT/K/N,PUBSCREEN/K,COMPRESS/K,CONNECT/K,THRESHVOLUME/K/N,SAMPLERATE/K/N,XMITDELAY/K/N,MAXBANDWIDTH/K/N,SAMPLETECHNIQUE/K,MAXXMITDELAY/K/N,MAXSAMPLERATE/K/N,SAMPLER/K,VOICEMAILDIR/K,AMPLIFY/K/N,INPUTSOURCE/K,PHONEBOOKx/K,MICGAIN/K/N,IDLERATE/K/N,ENABLEONCONNECT/S,XMITONPLAY/S,HOLDTOTRANSMIT/S,TCPBATCHXMIT/S,INVERTWAVEFORM/S\n");
  2001.           exit(0);
  2002.       }    
  2003. --- 2713,2726 ----
  2004.       UWORD wZoomCoords[4];
  2005.   
  2006.       if ((BStartedFromWB == FALSE)&&(largc == 2)&&(*largv[1] == '?'))
  2007.       {
  2008. !         printf("Template:  AmiPhone"
  2009. !                "PEERNAME/A,TOP/K/N,LEFT/K/N,PUBSCREEN/K,COMPRESS/K,CONNECT/K,"
  2010. !                "THRESHVOLUME/K/N,SAMPLERATE/K/N,XMITDELAY/K/N,MAXBANDWIDTH/K/N,"
  2011. !                "SAMPLETECHNIQUE/K,MAXXMITDELAY/K/N,MAXSAMPLERATE/K/N,SAMPLER/K,"
  2012. !                "AHIMODE/K/N,"
  2013. !                "VOICEMAILDIR/K,AMPLIFY/K/N,INPUTSOURCE/K,PHONEBOOKx/K,MICGAIN/K/N,"
  2014. !                "IDLERATE/K/N,ENABLEONCONNECT/S,XMITONPLAY/S,HOLDTOTRANSMIT/S,"
  2015. !                "TCPBATCHXMIT/S,INVERTWAVEFORM/S\n");
  2016.           exit(0);
  2017.       }    
  2018. ***************
  2019. *** 2577,2581 ****
  2020.                                 IDCMP_MOUSEBUTTONS|SLIDERIDCMP|IDCMP_VANILLAKEY|IDCMP_NEWSIZE,
  2021.               WA_Flags,       WFLG_SIZEBBOTTOM|WFLG_SMART_REFRESH|WFLG_ACTIVATE|
  2022. !                              /*WFLG_NEWLOOKMENUS|*/WFLG_CLOSEGADGET|WFLG_DRAGBAR|
  2023.                               WFLG_DEPTHGADGET,
  2024.               WA_Gadgets,    glist,
  2025. --- 2817,2821 ----
  2026.                                 IDCMP_MOUSEBUTTONS|SLIDERIDCMP|IDCMP_VANILLAKEY|IDCMP_NEWSIZE,
  2027.               WA_Flags,       WFLG_SIZEBBOTTOM|WFLG_SMART_REFRESH|WFLG_ACTIVATE|
  2028. !                              WFLG_NEWLOOKMENUS|WFLG_CLOSEGADGET|WFLG_DRAGBAR|
  2029.                               WFLG_DEPTHGADGET,
  2030.               WA_Gadgets,    glist,
  2031. ***************
  2032. *** 2631,2636 ****
  2033.                  (1L << SoundTaskPort->mp_SigBit)        |
  2034.                     (AppWindowPort ? (1L<<AppWindowPort->mp_SigBit) : 0)  |
  2035. !                (rexxHost ? (1L<<rexxHost->port->mp_SigBit) : 0)      |
  2036. !                (DelfinaBase ? delfsig : 0));
  2037.   
  2038.       /* Fill out our message to the graphics daemon */
  2039. --- 2871,2875 ----
  2040.                  (1L << SoundTaskPort->mp_SigBit)        |
  2041.                     (AppWindowPort ? (1L<<AppWindowPort->mp_SigBit) : 0)  |
  2042. !                (rexxHost ? (1L<<rexxHost->port->mp_SigBit) : 0) );
  2043.   
  2044.       /* Fill out our message to the graphics daemon */
  2045. ***************
  2046. *** 2661,2664 ****
  2047. --- 2900,2906 ----
  2048.       }
  2049.   
  2050. +     ChangeSamplerType(ubSamplerType);
  2051. +     SetMenuValues();
  2052.       /* Main loop */
  2053.       while (BProgramDone == FALSE) 
  2054. ***************
  2055. *** 2669,2682 ****
  2056.           if (signal & (1<<sigfull)) TransmitData(pubRightBuffer,  ALL_OF_BUFFER, ubCurrComp);  /* send right buffer */ 
  2057.   
  2058. -         if ((DelfinaBase)&&(signal & delfsig))
  2059. -         {
  2060. -             int nBytesAfterComp = ulSampleArraySize;
  2061. -             
  2062. -             if (ubCurrComp == COMPRESS_ADPCM2) nBytesAfterComp >>= 2;
  2063. -             if (ubCurrComp == COMPRESS_ADPCM3) nBytesAfterComp = (nBytesAfterComp * 3)>>3;
  2064. -             TransmitData(pubAllocedArray, nBytesAfterComp, ubCurrComp);
  2065. -         }
  2066. -                 
  2067.           if ((signal & SIGBREAKF_CTRL_F)&&((ubSamplerType == SAMPLER_TOCCATA)||(ubSamplerType == SAMPLER_AHI)))
  2068.           {
  2069. --- 2911,2914 ----
  2070. Only in ../AmiPhone_1.92: amiphone.c.info
  2071. diff -r -C 2 -P ../AmiPhone_1.92/amiphone.guide ./amiphone.guide
  2072. *** ../AmiPhone_1.92/amiphone.guide    Sat Nov 16 23:46:44 1996
  2073. --- ./amiphone.guide    Fri Mar 13 00:25:23 1998
  2074. ***************
  2075. *** 6,10 ****
  2076.   @node Main "Contents"
  2077.   
  2078. ! @{"AmiPhone" link Introduction} @{"V1.92" link History} by @{"Jeremy Friesner" link Me}
  2079.   
  2080.   AmiPhone is a program that allows you to have a voice conversation
  2081. --- 6,17 ----
  2082.   @node Main "Contents"
  2083.   
  2084. ! @{"AmiPhone" link Introduction} @{"V1.93" link History} by @{"Jeremy Friesner" link Me}
  2085. ! (This version by Martin Blom, <lcs@lysator.liu.se>. DISCLAIMER: This is
  2086. ! just a quick AHI fix. I am not going to maintain this program, and I'm
  2087. ! not interested in bug reports. The 1.92 source is on Aminet, and my patches
  2088. ! should come with this file. And please don't bother Jeremy with bug reports
  2089. ! either, I'm sure he has other things to do.)
  2090.   
  2091.   AmiPhone is a program that allows you to have a voice conversation
  2092. ***************
  2093. *** 12,16 ****
  2094.   and an 8 bit parallel port digitizer and microphone.
  2095.   
  2096. ! NOTE:  AmiPhone 1.92 is not compatible with AmiPhone 1.41ß or lower!  
  2097.          Make sure anyone you connect to has the latest version installed!
  2098.          
  2099. --- 19,23 ----
  2100.   and an 8 bit parallel port digitizer and microphone.
  2101.   
  2102. ! NOTE:  AmiPhone 1.93 is not compatible with AmiPhone 1.41ß or lower!  
  2103.          Make sure anyone you connect to has the latest version installed!
  2104.          
  2105. ***************
  2106. *** 92,96 ****
  2107.   @node Credits
  2108.   
  2109. !                             @{b}@{u}AmiPhone V1.92@{uu}@{ub}
  2110.   
  2111.                         Created by @{"Jeremy Friesner" link Me}
  2112. --- 99,103 ----
  2113.   @node Credits
  2114.   
  2115. !                             @{b}@{u}AmiPhone V1.93@{uu}@{ub}
  2116.   
  2117.                         Created by @{"Jeremy Friesner" link Me}
  2118. ***************
  2119. *** 102,106 ****
  2120.            Interrupt handlers assembled with PhxAss by Frank Wille
  2121.   
  2122. !                    Delfina DSP coding by Teemu Suikki
  2123.   @endnode
  2124.   
  2125. --- 109,113 ----
  2126.            Interrupt handlers assembled with PhxAss by Frank Wille
  2127.   
  2128. !                     Additional AHI code my Martin Blom
  2129.   @endnode
  2130.   
  2131. ***************
  2132. *** 252,258 ****
  2133.   asl.library        37     in LIBS:, required to use File Requesters
  2134.   toccata.library        6       in LIBS:, required to use Toccata digitizer
  2135. - delfina.library        2    in LIBS:, required to use Delfina digitizer
  2136.   timer.device        ?    in ROM, required
  2137. ! ahi.device              ?       in DEVS:, required to use AHI
  2138.   @endnode
  2139.   
  2140. --- 259,264 ----
  2141.   asl.library        37     in LIBS:, required to use File Requesters
  2142.   toccata.library        6       in LIBS:, required to use Toccata digitizer
  2143.   timer.device        ?    in ROM, required
  2144. ! ahi.device              4       in DEVS:, required to use AHI
  2145.   @endnode
  2146.   
  2147. ***************
  2148. *** 611,614 ****
  2149. --- 617,621 ----
  2150.      @{"PLAYFILE" link playfile}        Play a sound file.
  2151.      @{"QUIT" link quit}            Exit AmiPhone
  2152. +    @{"SETAHIMODE" link setahimode}            Set the AHI audio mode.
  2153.      @{"SETCOMPRESSION" link setcompression}    Choose a compression algorithm.
  2154.      @{"SETENABLEONCONNECT" link setenableonconnect}    Set Enable on Connect menu item.
  2155. ***************
  2156. *** 830,834 ****
  2157.                 hardware:  "GVPDSS8", "CUSTOM", "PERFECTSOUND",
  2158.                 "TOCCATA", "AMAS", "GENERIC", "SOUNDMAGIC", 
  2159. !               "DELFINA", "AURA", or "AHI".
  2160.       compression    - The currently selected compression algorithm:
  2161.                 "ADPCM2", "ADPCM3", or "NONE".
  2162. --- 837,841 ----
  2163.                 hardware:  "GVPDSS8", "CUSTOM", "PERFECTSOUND",
  2164.                 "TOCCATA", "AMAS", "GENERIC", "SOUNDMAGIC", 
  2165. !               "AURA", or "AHI".
  2166.       compression    - The currently selected compression algorithm:
  2167.                 "ADPCM2", "ADPCM3", or "NONE".
  2168. ***************
  2169. *** 836,843 ****
  2170.                 "HOLD" or "TOGGLE".
  2171.       inputgain    - The current input gain value (0-8 for DSS8,
  2172. !               0-15 for the Toccata or Delfina).
  2173.       amplify        - The current digital amplify value (1, 2, or 4).
  2174.       inputchannel    - The current input channel.  "LEFT" or "RIGHT".
  2175. !     inputsource    - The current input source.  "MIC" or "LINE".
  2176.       enableonconnect    - 1 if @{"Enable On Connect" link EnableOnConnect} is checked, else 0.
  2177.       xmitonplay    - 1 if @{"Xmit on Play" link XmitOnPlay} is checked, else 0.
  2178. --- 843,850 ----
  2179.                 "HOLD" or "TOGGLE".
  2180.       inputgain    - The current input gain value (0-8 for DSS8,
  2181. !               0-15 for the Toccata).
  2182.       amplify        - The current digital amplify value (1, 2, or 4).
  2183.       inputchannel    - The current input channel.  "LEFT" or "RIGHT".
  2184. !     inputsource    - The current input source.  "MIC", "LINE" or a number (AHI).
  2185.       enableonconnect    - 1 if @{"Enable On Connect" link EnableOnConnect} is checked, else 0.
  2186.       xmitonplay    - 1 if @{"Xmit on Play" link XmitOnPlay} is checked, else 0.
  2187. ***************
  2188. *** 970,973 ****
  2189. --- 977,1002 ----
  2190.   
  2191.   
  2192. + @node setahimode
  2193. +     SETAHIMODE
  2194. +     Arguments
  2195. +     ---------
  2196. +     MODE
  2197. +     Effect/Description
  2198. +     ------------------
  2199. +     Sets the current AHI audio mode to MODE.
  2200. +     Return Values
  2201. +     -------------
  2202. +     Returns 1.
  2203. +     Example
  2204. +     -------
  2205. +     SETAHIMODE 131079
  2206. + @endnode
  2207.   @node setcompression
  2208.   
  2209. ***************
  2210. *** 1077,1081 ****
  2211.       ------------------
  2212.       Sets the input gain.  This currently only has an effect for
  2213. !     the DSS8, PERFECTSOUND, DELFINA, or TOCCATA samplers.  If the 
  2214.       RELATIVE switch is specified, the input gain will be changed 
  2215.       by GAIN, otherwise it will be set to GAIN.
  2216. --- 1106,1110 ----
  2217.       ------------------
  2218.       Sets the input gain.  This currently only has an effect for
  2219. !     the DSS8, PERFECTSOUND or TOCCATA samplers.  If the 
  2220.       RELATIVE switch is specified, the input gain will be changed 
  2221.       by GAIN, otherwise it will be set to GAIN.
  2222. ***************
  2223. *** 1103,1107 ****
  2224.       Arguments
  2225.       ---------
  2226. !     [MIC] [LINE]
  2227.   
  2228.       Effect/Description
  2229. --- 1132,1136 ----
  2230.       Arguments
  2231.       ---------
  2232. !     [MIC] [LINE] [
  2233.   
  2234.       Effect/Description
  2235. ***************
  2236. *** 1117,1120 ****
  2237. --- 1146,1151 ----
  2238.       -------
  2239.       SETINPUTSOURCE MIC
  2240. +     SETINPUTSOURCE 0
  2241.   
  2242.   @endnode
  2243. ***************
  2244. *** 1129,1133 ****
  2245.       ---------
  2246.       [DSS8] [PERFECTSOUND] [AMAS] [SOUNDMAGIC] [TOCCATA] [AURA] 
  2247. !     [DELFINA] [AHI] [CUSTOM] [GENERIC]
  2248.   
  2249.       Effect/Description
  2250. --- 1160,1164 ----
  2251.       ---------
  2252.       [DSS8] [PERFECTSOUND] [AMAS] [SOUNDMAGIC] [TOCCATA] [AURA] 
  2253. !     [AHI] [CUSTOM] [GENERIC]
  2254.   
  2255.       Effect/Description
  2256. ***************
  2257. *** 1573,1584 ****
  2258.   Template:  AmiPhone PEERNAME/A, TOP/K/N, LEFT/K/N, COMPRESS/K, PUBSCREEN/K,
  2259.                       CONNECT/K, THRESHVOLUME/K/N, XMITDELAY/K/N, FONT/K,
  2260. !                     FONTSIZE/K, SAMPLERATE/K/N, MAXBANDWIDTH/K/N, SENDPRI/K/N, 
  2261.                       RECEIVEPRI/K/N, MAXSAMPLERATE/K/N, MAXXMITDELAY/K/N,
  2262. !                     SAMPLER/K, INPUTCHANNEL/K, VOICEMAILDIR/K, AMPLIFY/K/N, 
  2263.                       INPUTSOURCE/K, PHONEBOOKx/K, MICGAIN/K/N, LINEGAIN/K/N,
  2264. !                     IDLERATE/K/N, PRESEND/K/N, POSTSEND/K/N, XMITONPLAY/S, 
  2265. !                     ENABLEONCONNECT/S, HOLDTOTRANSMIT/S, BATCHTCPXMIT/S, 
  2266. !                     INVERTWAVEFORM/S
  2267.                                   
  2268.       @{"AMPLIFY/K/N" link AmplifyArg}       Specify a digital signal amplification value
  2269.       @{"BATCHTCPXMIT/S" link TCPBatchXmitArg}    Send whole sentences at once over slow links
  2270. --- 1604,1616 ----
  2271.   Template:  AmiPhone PEERNAME/A, TOP/K/N, LEFT/K/N, COMPRESS/K, PUBSCREEN/K,
  2272.                       CONNECT/K, THRESHVOLUME/K/N, XMITDELAY/K/N, FONT/K,
  2273. !                     FONTSIZE/K, SAMPLERATE/K/N, MAXBANDWIDTH/K/N, SENDPRI/K/N,
  2274.                       RECEIVEPRI/K/N, MAXSAMPLERATE/K/N, MAXXMITDELAY/K/N,
  2275. !                     SAMPLER/K, AHIMODE/K/N, INPUTCHANNEL/K, VOICEMAILDIR/K,
  2276.                       INPUTSOURCE/K, PHONEBOOKx/K, MICGAIN/K/N, LINEGAIN/K/N,
  2277. !                     AMPLIFY/K/N, IDLERATE/K/N, PRESEND/K/N, POSTSEND/K/N,
  2278. !                     XMITONPLAY/S, ENABLEONCONNECT/S, HOLDTOTRANSMIT/S,
  2279. !                     BATCHTCPXMIT/S, INVERTWAVEFORM/S
  2280.                                   
  2281. +     @{"AHIMODE/K" link AHIModeArg}         Inform AmiPhone as to what audio mode you like
  2282.       @{"AMPLIFY/K/N" link AmplifyArg}       Specify a digital signal amplification value
  2283.       @{"BATCHTCPXMIT/S" link TCPBatchXmitArg}    Send whole sentences at once over slow links
  2284. ***************
  2285. *** 1700,1704 ****
  2286.          otherwise used with parallel port based samplers.  Thus,
  2287.          PreSend is most useful when used with non-Parallel-port
  2288. !        based samplers such as the Toccata or Delfina.  For 
  2289.          parallel-port based samplers, try raising the @{"idle rate" link IdleRateArg}
  2290.          before resorting to using this argument.
  2291. --- 1732,1736 ----
  2292.          otherwise used with parallel port based samplers.  Thus,
  2293.          PreSend is most useful when used with non-Parallel-port
  2294. !        based samplers such as the Toccata.  For 
  2295.          parallel-port based samplers, try raising the @{"idle rate" link IdleRateArg}
  2296.          before resorting to using this argument.
  2297. ***************
  2298. *** 1766,1771 ****
  2299.   This startup argument allows you to set AmiPhone to use a given
  2300.   hardware microphone amplification level for the audio being digitized.  
  2301. ! Microphone gain is supported on two digitizers--the Toccata and the
  2302. ! Delfina.  It can be set to either +20dB (the default), or +0dB.
  2303.   
  2304.   Usage Example:
  2305. --- 1798,1803 ----
  2306.   This startup argument allows you to set AmiPhone to use a given
  2307.   hardware microphone amplification level for the audio being digitized.  
  2308. ! Microphone gain is supported on two digitizers--the Toccata.  It can be set
  2309. ! to either +20dB (the default), or +0dB.
  2310.   
  2311.   Usage Example:
  2312. ***************
  2313. *** 1796,1803 ****
  2314.          Example:  AmiPhone SAMPLER=TOCCATA LINEGAIN=9
  2315.     
  2316. -   DELFINA - Gain levels range from 0 to 15.
  2317. -        Example:  AmiPhone SAMPLER=DELFINA LINEGAIN=14
  2318. -                       
  2319.     PERFECTSOUND - This digitizer has a way to change the current
  2320.              amplification by a given amount, but no known
  2321. --- 1828,1831 ----
  2322. ***************
  2323. *** 1952,1955 ****
  2324. --- 1980,1995 ----
  2325.   
  2326.   
  2327. + @node AHIModeArg
  2328. + With this argument, you can let AmiPhone know which audio mode
  2329. + you'd like to use when using an AHI sampler. The argument
  2330. + is the desired audio mode, in decimal.
  2331. + Usage Example:
  2332. + AmiPhone SAMPLER=AHI AHIMODE=131079 INPUTSOURCE=0
  2333. + @endnode
  2334.   @node SamplerArg
  2335.   
  2336. ***************
  2337. *** 1975,1981 ****
  2338.         Set this to use the Toccata Zorro II sound card as a sampler.
  2339.   
  2340. -   DELFINA
  2341. -       Set this to use the Delfina Zorro II sound card as a sampler.
  2342. -   
  2343.     AURA
  2344.         Set this to use the Aura PCMCIA card as a sampler.
  2345. --- 2015,2018 ----
  2346. ***************
  2347. *** 1989,1995 ****
  2348.     AHI
  2349.         Set this to use the AHI audio library as an interface
  2350. !       to your sampler.  (Beware:  AHI support is COMPLETELY untested
  2351. !       right now!)
  2352. !       
  2353.     CUSTOM
  2354.           This setting allows you to set technical details of the 
  2355. --- 2026,2031 ----
  2356.     AHI
  2357.         Set this to use the AHI audio library as an interface
  2358. !       to your sampler.
  2359.     CUSTOM
  2360.           This setting allows you to set technical details of the 
  2361. ***************
  2362. *** 2043,2047 ****
  2363.   
  2364.   Note that this will only work with digitizers that connect to the 
  2365. ! parallel port (so don't try it with your Delfina, Toccata or AHI board).
  2366.   
  2367.   Most parallel port digitizers use three binary switches to control
  2368. --- 2079,2083 ----
  2369.   
  2370.   Note that this will only work with digitizers that connect to the 
  2371. ! parallel port (so don't try it with your Toccata or AHI board).
  2372.   
  2373.   Most parallel port digitizers use three binary switches to control
  2374. ***************
  2375. *** 2155,2159 ****
  2376.   @node InputSourceArg
  2377.   
  2378. ! Certain digitizers (to be exact, the Sound Magic, Delfina and 
  2379.   Toccata digitizers) have multiple sound input jacks.  This 
  2380.   startup argument allows you to set the default jack to receive 
  2381. --- 2191,2195 ----
  2382.   @node InputSourceArg
  2383.   
  2384. ! Certain digitizers (to be exact, the Sound Magic and 
  2385.   Toccata digitizers) have multiple sound input jacks.  This 
  2386.   startup argument allows you to set the default jack to receive 
  2387. ***************
  2388. *** 2168,2171 ****
  2389. --- 2204,2211 ----
  2390.   AmiPhone INPUTSOURCE=LINE
  2391.   
  2392. + or
  2393. + AmiPhone SAMPLER=AHI AHIMODE=131079 INPUTSOURCE=0
  2394.   @endnode
  2395.   
  2396. ***************
  2397. *** 2551,2559 ****
  2398.   Line Gain - This submenu allows you to raise and lower the gain of the
  2399.               sound signal entering the digitizer.  This menu currently
  2400. !             only works with the DSS8, Delfina, Toccata and PerfectSound 
  2401.               digitizers.
  2402.   
  2403.   Mic Gain - This submenu allows you to set or unset the +20dB microphone
  2404. !        gain that is available on the Toccata and Delfina samplers.
  2405.   
  2406.   Digital Amplify - This submenu lets you @{"digitally amplify" link DigitalAmplification} the input
  2407. --- 2591,2599 ----
  2408.   Line Gain - This submenu allows you to raise and lower the gain of the
  2409.               sound signal entering the digitizer.  This menu currently
  2410. !             only works with the DSS8, Toccata and PerfectSound 
  2411.               digitizers.
  2412.   
  2413.   Mic Gain - This submenu allows you to set or unset the +20dB microphone
  2414. !        gain that is available on the Toccata sampler.
  2415.   
  2416.   Digital Amplify - This submenu lets you @{"digitally amplify" link DigitalAmplification} the input
  2417. ***************
  2418. *** 2567,2572 ****
  2419.   Input Source - This submenu lets you choose which input jack to sample
  2420.                  from--either the microphone jack or the line-level jack.
  2421. !                This submenu is only applicable to the Toccata, Delfina, 
  2422. !                and Sound Magic digitizers.
  2423.                  
  2424.   Enable on Connect - If this is checked, you will begin transmission of 
  2425. --- 2607,2612 ----
  2426.   Input Source - This submenu lets you choose which input jack to sample
  2427.                  from--either the microphone jack or the line-level jack.
  2428. !                This submenu is only applicable to the Toccata and Sound
  2429. !                Magic digitizers.
  2430.                  
  2431.   Enable on Connect - If this is checked, you will begin transmission of 
  2432. ***************
  2433. *** 2637,2641 ****
  2434.   the signal coming from the microphone is a little bit soft.  You have
  2435.   to talk loudly into the microphone to be heard clearly.  For some 
  2436. ! digitizers, such as the DSS8, PerfectSound, Delfina, or Toccata, you 
  2437.   can use the @{"Mic" link MicGainArg} or {"Line" link LineGainArg} Gain startup arguments or @{"menu items" link SettingsMenu} to fix this problem.
  2438.   However, other brands of sampler either do not support this, or do
  2439. --- 2677,2681 ----
  2440.   the signal coming from the microphone is a little bit soft.  You have
  2441.   to talk loudly into the microphone to be heard clearly.  For some 
  2442. ! digitizers, such as the DSS8, PerfectSound or Toccata, you 
  2443.   can use the @{"Mic" link MicGainArg} or {"Line" link LineGainArg} Gain startup arguments or @{"menu items" link SettingsMenu} to fix this problem.
  2444.   However, other brands of sampler either do not support this, or do
  2445. ***************
  2446. *** 2740,2747 ****
  2447.       has been tested successfully with the DSS8+, PerfectSound 3, 
  2448.       Sound Magic, and several homemade samplers.  AmiPhone also supports 
  2449. !     the Delfina and Toccata Zorro II sound boards, as well as the Aura 
  2450.       PCMCIA sound card for digitizing purposes, and the AHI sound card 
  2451. !     interface library.  The AHI implementation is untested, so it 
  2452. !     probably doesn't work, though.
  2453.   
  2454.   Q:  But I don't have any sampler!
  2455. --- 2780,2786 ----
  2456.       has been tested successfully with the DSS8+, PerfectSound 3, 
  2457.       Sound Magic, and several homemade samplers.  AmiPhone also supports 
  2458. !     the Toccata Zorro II sound board, as well as the Aura 
  2459.       PCMCIA sound card for digitizing purposes, and the AHI sound card 
  2460. !     interface library.
  2461.   
  2462.   Q:  But I don't have any sampler!
  2463. ***************
  2464. *** 2823,2828 ****
  2465.   ( "-" = new feature, "*" = bug fix)
  2466.   
  2467. ! 1.93 :
  2468. ! ND   - Add menu item to toggle the VOICEMAIL env var
  2469.   
  2470.   1.92 : (Public Release 07/07/96)
  2471. --- 2862,2878 ----
  2472.   ( "-" = new feature, "*" = bug fix)
  2473.   
  2474. ! 1.93 : (Public Release 1998-03-13)
  2475. !      The 1.93 changes by Martin Blom:
  2476. !      - Recompiled using SAS/C 6.58.
  2477. !      * Removed the Delfina support (it didn't work anymore).
  2478. !      - New-Look menus.
  2479. !      - The AHI audio mode is now selectable.
  2480. !      - Input can be selected in AHI mode.
  2481. !      * Removed some debug code.
  2482. !      - Added Fredrik Rambris installer script (supports Miami).
  2483. !        (I hope you don't mind, Fredrik---your mail address is not
  2484. !        valid anymore.)
  2485.   
  2486.   1.92 : (Public Release 07/07/96)
  2487. ***************
  2488. *** 3217,3221 ****
  2489.   @node Knownproblems "Known Bugs and Other Problems"
  2490.   
  2491. ! Here are the things that still don't work right with AmiPhone V1.91:
  2492.   
  2493.   - There are occasional skipped or repeated packets.
  2494. --- 3267,3271 ----
  2495.   @node Knownproblems "Known Bugs and Other Problems"
  2496.   
  2497. ! Here are the things that still don't work right with AmiPhone V1.93:
  2498.   
  2499.   - There are occasional skipped or repeated packets.
  2500. ***************
  2501. *** 3224,3229 ****
  2502.     be read from the stream, their memory is not freed.  (This may
  2503.     be an AmiTCP problem, actually)
  2504. - - The AHI interface is not tested and probably doesn't work.
  2505.   
  2506.   - The Toccata support may be broken again.  If you want it working
  2507. --- 3274,3277 ----
  2508. Only in ../AmiPhone_1.92: amiphone.guide.info
  2509. diff -r -C 2 -P ../AmiPhone_1.92/amiphone.h ./amiphone.h
  2510. *** ../AmiPhone_1.92/amiphone.h    Sat Nov 16 23:46:40 1996
  2511. --- ./amiphone.h    Mon Feb 16 04:06:05 1998
  2512. ***************
  2513. *** 4,7 ****
  2514. --- 4,18 ----
  2515.   #define AMIPHONE_H
  2516.   
  2517. + #include <CompilerSpecific.h>
  2518. + #ifdef __SASC
  2519. +   #pragma msg 85 ignore
  2520. +   #pragma msg 104 ignore
  2521. +   #pragma msg 225 ignore
  2522. + #endif
  2523.   #define ALL_OF_BUFFER -1
  2524.   #define MAXPEERNAMELENGTH 100
  2525. ***************
  2526. *** 19,23 ****
  2527.   #define SAMPLER_SOMAGIC 5
  2528.   #define SAMPLER_AURA    6
  2529. ! #define SAMPLER_DELFINA 7
  2530.   #define SAMPLER_CUSTOM  8
  2531.   #define SAMPLER_AHI     9
  2532. --- 30,34 ----
  2533.   #define SAMPLER_SOMAGIC 5
  2534.   #define SAMPLER_AURA    6
  2535. ! /* #define SAMPLER_DELFINA 7 */
  2536.   #define SAMPLER_CUSTOM  8
  2537.   #define SAMPLER_AHI     9
  2538. ***************
  2539. *** 39,42 ****
  2540. --- 50,63 ----
  2541.   #define INPUT_SOURCE_MIC 0
  2542.   #define INPUT_SOURCE_EXT 1
  2543. + #define INPUT_SOURCE_0   0
  2544. + #define INPUT_SOURCE_1   1
  2545. + #define INPUT_SOURCE_2   2
  2546. + #define INPUT_SOURCE_3   3
  2547. + #define INPUT_SOURCE_4   4
  2548. + #define INPUT_SOURCE_5   5
  2549. + #define INPUT_SOURCE_6   6
  2550. + #define INPUT_SOURCE_7   7
  2551. + #define INPUT_SOURCE_8   8
  2552. + #define INPUT_SOURCE_9   9
  2553.   
  2554.   /* different methods of selecting sampling */
  2555. ***************
  2556. *** 85,89 ****
  2557.   void ChangeVolumeThreshold(int nNewPercentage);
  2558.   
  2559. ! __geta4 void GraphicsTaskMain(void);
  2560.   
  2561.   /* Functions in the graphics subtask */
  2562. --- 106,110 ----
  2563.   void ChangeVolumeThreshold(int nNewPercentage);
  2564.   
  2565. ! void SAVEDS GraphicsTaskMain(void);
  2566.   
  2567.   /* Functions in the graphics subtask */
  2568. diff -r -C 2 -P ../AmiPhone_1.92/amiphoned.c ./amiphoned.c
  2569. *** ../AmiPhone_1.92/amiphoned.c    Sat Nov 16 23:46:40 1996
  2570. --- ./amiphoned.c    Fri Mar  6 00:21:40 1998
  2571. ***************
  2572. *** 1,4 ****
  2573. ! #define DICE_C
  2574.   
  2575.   #include <stdio.h>
  2576.   #include <stdlib.h>
  2577. --- 1,5 ----
  2578. ! /* :ts=4 */
  2579.   
  2580. + #include <netinclude:sys/types.h>
  2581.   #include <stdio.h>
  2582.   #include <stdlib.h>
  2583. ***************
  2584. *** 83,87 ****
  2585.   
  2586.   /* Why does this come out as 18 unless I define it explicitely here?  Weird! */
  2587. ! #define EWOULDBLOCK 35
  2588.   
  2589.   /* private functions */
  2590. --- 84,88 ----
  2591.   
  2592.   /* Why does this come out as 18 unless I define it explicitely here?  Weird! */
  2593. ! /* #define EWOULDBLOCK 35*/
  2594.   
  2595.   /* private functions */
  2596. ***************
  2597. *** 128,132 ****
  2598.   
  2599.   /* private vars for this module */
  2600. ! static char [] = VERSION_STRING;
  2601.   static char * szRelayName[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
  2602.   static LONG   sRelayUDPSocket[10]= {-1  ,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1};
  2603. --- 129,133 ----
  2604.   
  2605.   /* private vars for this module */
  2606. ! static char my_version[] = AMIPHONED_VERSION;
  2607.   static char * szRelayName[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
  2608.   static LONG   sRelayUDPSocket[10]= {-1  ,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1};
  2609. ***************
  2610. *** 827,831 ****
  2611.       }
  2612.       
  2613. !     if (LayoutMenus(Menu, VisualInfo, TAG_DONE))
  2614.       {
  2615.           /* Update the menus */
  2616. --- 828,832 ----
  2617.       }
  2618.       
  2619. !     if (LayoutMenus(Menu, VisualInfo, GTMN_NewLookMenus, TRUE, TAG_DONE))
  2620.       {
  2621.           /* Update the menus */
  2622. ***************
  2623. *** 851,855 ****
  2624.       const int diff = 'a' - 'A';
  2625.   
  2626. !     if (sOldString == NULL) return();
  2627.        while (*i != '\0')
  2628.        {
  2629. --- 852,856 ----
  2630.       const int diff = 'a' - 'A';
  2631.   
  2632. !     if (sOldString == NULL) return;
  2633.        while (*i != '\0')
  2634.        {
  2635. ***************
  2636. *** 1278,1282 ****
  2637.       }
  2638.   
  2639. !     if (FD_ISSET(sUDPSocket, &fsReadSet))    
  2640.       {
  2641.           ReceiveUDPPacket(&recBuffer);
  2642. --- 1279,1283 ----
  2643.       }
  2644.   
  2645. !     if (sUDPSocket != -1 && FD_ISSET(sUDPSocket, &fsReadSet))    
  2646.       {
  2647.           ReceiveUDPPacket(&recBuffer);
  2648. ***************
  2649. *** 1284,1294 ****
  2650.       }
  2651.   
  2652. !     if (FD_ISSET(sTCPSocket, &fsWriteSet)) ReduceTCPQueue(CLIENT_TCP_QUEUE, sTCPSocket);
  2653. !     if (FD_ISSET(sTCPSocket, &fsReadSet))  ReceiveTCPPacket();
  2654.       
  2655.       for (i=0;i<10;i++) 
  2656.       {
  2657. !         if (FD_ISSET(sRelayTCPSocket[i],&fsReadSet)) HandleRelayResponse(i);
  2658. !         if (FD_ISSET(sRelayTCPSocket[i],&fsWriteSet)) ReduceTCPQueue(i, sRelayTCPSocket[i]);
  2659.       }
  2660.       
  2661. --- 1285,1301 ----
  2662.       }
  2663.   
  2664. !     if(sTCPSocket != -1)
  2665. !     {
  2666. !         if (FD_ISSET(sTCPSocket, &fsWriteSet)) ReduceTCPQueue(CLIENT_TCP_QUEUE, sTCPSocket);
  2667. !         if (FD_ISSET(sTCPSocket, &fsReadSet))  ReceiveTCPPacket();
  2668. !     }
  2669.       
  2670.       for (i=0;i<10;i++) 
  2671.       {
  2672. !         if(sRelayTCPSocket[i] != -1)
  2673. !         {
  2674. !             if (FD_ISSET(sRelayTCPSocket[i],&fsReadSet)) HandleRelayResponse(i);
  2675. !             if (FD_ISSET(sRelayTCPSocket[i],&fsWriteSet)) ReduceTCPQueue(i, sRelayTCPSocket[i]);
  2676. !         }
  2677.       }
  2678.       
  2679. ***************
  2680. *** 1329,1333 ****
  2681.       fprintf(fpDebug,"sin_family   =%d\n",psaSock->sin_family);
  2682.       fprintf(fpDebug,"sin_port     =%d\n",psaSock->sin_port);
  2683. !     fprintf(fpDebug,"sin_sin_addr =%d\n",(ULONG)(psaSock->sin_addr));
  2684.       fprintf(fpDebug,"sin_zero     = %i %i %i %i %i %i %i %i\n",
  2685.               psaSock->sin_zero[0],
  2686. --- 1336,1340 ----
  2687.       fprintf(fpDebug,"sin_family   =%d\n",psaSock->sin_family);
  2688.       fprintf(fpDebug,"sin_port     =%d\n",psaSock->sin_port);
  2689. !     fprintf(fpDebug,"sin_sin_addr =%d\n",(ULONG)(psaSock->sin_addr.s_addr));
  2690.       fprintf(fpDebug,"sin_zero     = %i %i %i %i %i %i %i %i\n",
  2691.               psaSock->sin_zero[0],
  2692. ***************
  2693. *** 1476,1480 ****
  2694.       const int diff = 'a' - 'A';
  2695.   
  2696. !     UNLESS(sOldString) return();
  2697.       
  2698.       while (*i != '\0')
  2699. --- 1483,1487 ----
  2700.       const int diff = 'a' - 'A';
  2701.   
  2702. !     UNLESS(sOldString) return;
  2703.       
  2704.       while (*i != '\0')
  2705. ***************
  2706. *** 2022,2026 ****
  2707.       BPTR MyLock = Lock(szDirectory, ACCESS_READ);
  2708.       LONG ulBlocksFree;
  2709. !     __aligned struct InfoData MyData;
  2710.       
  2711.       if (MyLock == 0)
  2712. --- 2029,2033 ----
  2713.       BPTR MyLock = Lock(szDirectory, ACCESS_READ);
  2714.       LONG ulBlocksFree;
  2715. !     ALIGNED struct InfoData MyData;
  2716.       
  2717.       if (MyLock == 0)
  2718. ***************
  2719. *** 2100,2104 ****
  2720.       struct ExAllControl * eac;
  2721.       struct ExAllData * ead;
  2722. !     __aligned UBYTE EAData[sizeof(struct ExAllData)*30];
  2723.       
  2724.       if (MyLock == 0) 
  2725. --- 2107,2111 ----
  2726.       struct ExAllControl * eac;
  2727.       struct ExAllData * ead;
  2728. !     ALIGNED UBYTE EAData[sizeof(struct ExAllData)*30];
  2729.       
  2730.       if (MyLock == 0) 
  2731. Only in ../AmiPhone_1.92: amiphoned.c.info
  2732. diff -r -C 2 -P ../AmiPhone_1.92/amiphonepacket.h ./amiphonepacket.h
  2733. *** ../AmiPhone_1.92/amiphonepacket.h    Sat Nov 16 23:46:40 1996
  2734. --- ./amiphonepacket.h    Tue Mar  3 19:49:35 1998
  2735. ***************
  2736. *** 4,12 ****
  2737.   /* Current Version number for both AmiPhone and AmiPhoned */
  2738.   /* Make sure ALL THREE of these #define lines are in-sync! */
  2739. ! #define VERSION_NUMBER         192
  2740.   #ifdef DEBUG_FLAG
  2741. ! #define VERSION_STRING     "$VER: 1.92D"
  2742.   #else
  2743. ! #define VERSION_STRING     "$VER: 1.92"
  2744.   #endif
  2745.   
  2746. --- 4,14 ----
  2747.   /* Current Version number for both AmiPhone and AmiPhoned */
  2748.   /* Make sure ALL THREE of these #define lines are in-sync! */
  2749. ! #define VERSION_NUMBER         193
  2750.   #ifdef DEBUG_FLAG
  2751. ! #define AMIPHONE_VERSION     "$VER: AmiPhone 1.93D " __AMIGADATE__ "\r\n"
  2752. ! #define AMIPHONED_VERSION     "$VER: AmiPhoned 1.93D " __AMIGADATE__ "\r\n"
  2753.   #else
  2754. ! #define AMIPHONE_VERSION     "$VER: AmiPhone 1.93 " __AMIGADATE__ "\r\n"
  2755. ! #define AMIPHONED_VERSION     "$VER: AmiPhoned 1.93 " __AMIGADATE__ "\r\n"
  2756.   #endif
  2757.   
  2758. diff -r -C 2 -P ../AmiPhone_1.92/asl.c ./asl.c
  2759. *** ../AmiPhone_1.92/asl.c    Sat Nov 16 23:46:40 1996
  2760. --- ./asl.c    Sun Feb 15 23:04:17 1998
  2761. ***************
  2762. *** 1,3 ****
  2763. --- 1,4 ----
  2764.   /* asl.c -- function for getting filenames */
  2765. + /* :ts=4 */
  2766.   
  2767.   #ifndef ASL_C
  2768. ***************
  2769. *** 34,57 ****
  2770.       if (szDefaultDirParam == NULL)     szDefaultDir  = szDefaultDefaultDir; else szDefaultDir = szDefaultDirParam;
  2771.       if (szDefaultFile == NULL)     szDefaultFile = "";
  2772. !        
  2773. !     struct TagItem frtags[] =
  2774. !     {
  2775. !         ASL_Hail,    (ULONG)szMessage,
  2776.           ASL_Height,    185,
  2777. !         ASL_Width,    320,
  2778. !         ASL_LeftEdge,    0,
  2779.           ASL_TopEdge,    15,
  2780. !         ASL_Dir,        (ULONG)szDefaultDir,
  2781. !         ASL_File,       (ULONG)szDefaultFile,
  2782.           ASL_OKText,    (ULONG)szOKMessage,
  2783. !         ASL_FuncFlags,  lFlags,
  2784. !         ASL_CancelText,    (ULONG)"Cancel",
  2785.           ASL_Window,    PhoneWindow,
  2786. !         TAG_DONE
  2787. !     };
  2788. !     
  2789. !     fr = (struct FileRequester *) AllocAslRequest(ASL_FileRequest, frtags);    
  2790. !     if (fr == NULL) return(FALSE);
  2791. !     
  2792.   /*    SetPointer(PhoneWindow, (UWORD *)waitPointer, 16, 16, -6, 0); */
  2793.       if (AslRequest(fr, NULL))
  2794. --- 35,55 ----
  2795.       if (szDefaultDirParam == NULL)     szDefaultDir  = szDefaultDefaultDir; else szDefaultDir = szDefaultDirParam;
  2796.       if (szDefaultFile == NULL)     szDefaultFile = "";
  2797. !     fr = (struct FileRequester *) AllocAslRequestTags(ASL_FileRequest,
  2798. !       ASL_Hail,    (ULONG)szMessage,
  2799.           ASL_Height,    185,
  2800. !       ASL_Width,    320,
  2801. !       ASL_LeftEdge,    0,
  2802.           ASL_TopEdge,    15,
  2803. !       ASL_Dir,        (ULONG)szDefaultDir,
  2804. !       ASL_File,       (ULONG)szDefaultFile,
  2805.           ASL_OKText,    (ULONG)szOKMessage,
  2806. !       ASL_FuncFlags,  lFlags,
  2807. !       ASL_CancelText,    (ULONG)"Cancel",
  2808.           ASL_Window,    PhoneWindow,
  2809. !       TAG_DONE);    
  2810. !   if (fr == NULL) return(FALSE);
  2811.   /*    SetPointer(PhoneWindow, (UWORD *)waitPointer, 16, 16, -6, 0); */
  2812.       if (AslRequest(fr, NULL))
  2813. Only in ../AmiPhone_1.92: bin
  2814. diff -r -C 2 -P ../AmiPhone_1.92/browse.c ./browse.c
  2815. *** ../AmiPhone_1.92/browse.c    Sat Nov 16 23:46:38 1996
  2816. --- ./browse.c    Mon Feb 16 01:15:51 1998
  2817. ***************
  2818. *** 1,7 ****
  2819. --- 1,9 ----
  2820.   /* Module for the voice mail browser window */
  2821. + /* :ts=4 */
  2822.   
  2823.   #ifndef BROWSE_C
  2824.   #define BROWSE_C
  2825.   
  2826. + #include <netinclude:sys/types.h>
  2827.   #include <stdio.h>
  2828.   
  2829. ***************
  2830. *** 62,66 ****
  2831.   /* private data */
  2832.   static struct GfxBase * GfxBase       = NULL;
  2833. ! static struct Library * IntuitionBase = NULL;
  2834.   static struct Library * GadToolsBase  = NULL;
  2835.   static struct List    * FileList      = NULL;
  2836. --- 64,68 ----
  2837.   /* private data */
  2838.   static struct GfxBase * GfxBase       = NULL;
  2839. ! static struct IntuitionBase * IntuitionBase = NULL;
  2840.   static struct Library * GadToolsBase  = NULL;
  2841.   static struct List    * FileList      = NULL;
  2842. ***************
  2843. *** 197,201 ****
  2844.       struct ExAllControl * eac;
  2845.       struct ExAllData * ead;
  2846. !     __aligned UBYTE EAData[sizeof(struct ExAllData)*30];
  2847.       struct List * FileList = NULL;
  2848.       struct Node * newnode;
  2849. --- 199,203 ----
  2850.       struct ExAllControl * eac;
  2851.       struct ExAllData * ead;
  2852. !     ALIGNED UBYTE EAData[sizeof(struct ExAllData)*30];
  2853.       struct List * FileList = NULL;
  2854.       struct Node * newnode;
  2855. ***************
  2856. *** 628,632 ****
  2857.   
  2858.   
  2859. ! __geta4 void BrowserMain(void)
  2860.   {    
  2861.       ULONG ulBrowseMask = SIGBREAKF_CTRL_C, ulSignals;
  2862. --- 630,634 ----
  2863.   
  2864.   
  2865. ! SAVEDS void BrowserMain(void)
  2866.   {    
  2867.       ULONG ulBrowseMask = SIGBREAKF_CTRL_C, ulSignals;
  2868. ***************
  2869. *** 678,682 ****
  2870.               WA_IDCMP,       IDCMP_REFRESHWINDOW|IDCMP_CLOSEWINDOW|SLIDERIDCMP|IDCMP_NEWSIZE,
  2871.               WA_Flags,       WFLG_SIZEBBOTTOM|WFLG_SMART_REFRESH|WFLG_ACTIVATE|
  2872. !                     /*WFLG_NEWLOOKMENUS|*/WFLG_CLOSEGADGET|WFLG_DRAGBAR|
  2873.                       WFLG_DEPTHGADGET,
  2874.               WA_Gadgets,    glist,
  2875. --- 680,684 ----
  2876.               WA_IDCMP,       IDCMP_REFRESHWINDOW|IDCMP_CLOSEWINDOW|SLIDERIDCMP|IDCMP_NEWSIZE,
  2877.               WA_Flags,       WFLG_SIZEBBOTTOM|WFLG_SMART_REFRESH|WFLG_ACTIVATE|
  2878. !                     WFLG_NEWLOOKMENUS|WFLG_CLOSEGADGET|WFLG_DRAGBAR|
  2879.                       WFLG_DEPTHGADGET,
  2880.               WA_Gadgets,    glist,
  2881. Only in ../AmiPhone_1.92: browse.c.info
  2882. diff -r -C 2 -P ../AmiPhone_1.92/browse.h ./browse.h
  2883. *** ../AmiPhone_1.92/browse.h    Sat Nov 16 23:46:40 1996
  2884. --- ./browse.h    Sun Feb 15 13:25:08 1998
  2885. ***************
  2886. *** 3,7 ****
  2887.   #define BROWSE_H
  2888.   
  2889. ! __geta4 void BrowserMain(void);
  2890.   
  2891.   void StopBrowser(void);
  2892. --- 3,9 ----
  2893.   #define BROWSE_H
  2894.   
  2895. ! #include <CompilerSpecific.h>
  2896. ! SAVEDS void BrowserMain(void);
  2897.   
  2898.   void StopBrowser(void);
  2899. diff -r -C 2 -P ../AmiPhone_1.92/ciatimer.c ./ciatimer.c
  2900. *** ../AmiPhone_1.92/ciatimer.c    Sat Nov 16 23:46:44 1996
  2901. --- ./ciatimer.c    Sun Mar  1 20:47:16 1998
  2902. ***************
  2903. *** 1,6 ****
  2904. --- 1,10 ----
  2905. + /* :ts=4 */
  2906.   #include <time.h>
  2907.   #include <stdlib.h>
  2908.   #include <stdio.h>
  2909.   #include <string.h>
  2910. + #include <math.h>
  2911.   
  2912.   #include <exec/io.h>
  2913. ***************
  2914. *** 16,23 ****
  2915.   #include <clib/mathieeedoubbas_protos.h>
  2916.   
  2917.   #include <resources/cia.h>
  2918.   
  2919.   #include <libraries/dos.h>
  2920. - #include <libraries/delfina.h>
  2921.   #include <resources/misc.h>
  2922.   #include <utility/tagitem.h>
  2923. --- 20,29 ----
  2924.   #include <clib/mathieeedoubbas_protos.h>
  2925.   
  2926. + #include <libraries/gadtools.h>
  2927. + #include <clib/gadtools_protos.h>
  2928.   #include <resources/cia.h>
  2929.   
  2930.   #include <libraries/dos.h>
  2931.   #include <resources/misc.h>
  2932.   #include <utility/tagitem.h>
  2933. ***************
  2934. *** 39,52 ****
  2935.   #include "messages.h"
  2936.   #include "codec.h"
  2937. - #include "delfph.h"
  2938.   
  2939. ! #include "toccata/include/libraries/toccata.h"
  2940. ! #include "toccata/include/clib/toccata_protos.h"
  2941. ! #include "toccata/include/pragmas/toccata_pragmas.h"
  2942.   
  2943.   /* Some hardware addresses to sample from */
  2944. ! #define AMIGA_HARDWARE_SAMPLE_ADDRESS     ((UBYTE *) (&pciaa->ciaprb))
  2945. ! #define AURA_SAMPLE_ADDRESS_LEFT      ((UBYTE *) 0xA20000)
  2946. ! #define AURA_SAMPLE_ADDRESS_RIGHT     ((UBYTE *) 0xA20002)
  2947.   
  2948.       
  2949. --- 45,59 ----
  2950.   #include "messages.h"
  2951.   #include "codec.h"
  2952.   
  2953. ! #include <libraries/toccata.h>
  2954. ! #include <clib/toccata_protos.h>
  2955. ! #include <pragmas/toccata_pragmas.h>
  2956. ! void kprintf(char *, ...);
  2957.   
  2958.   /* Some hardware addresses to sample from */
  2959. ! #define AMIGA_HARDWARE_SAMPLE_ADDRESS    ((UBYTE *) (&pciaa->ciaprb))
  2960. ! #define AURA_SAMPLE_ADDRESS_LEFT    ((UBYTE *) 0xA20000)
  2961. ! #define AURA_SAMPLE_ADDRESS_RIGHT    ((UBYTE *) 0xA20002)
  2962.   
  2963.       
  2964. ***************
  2965. *** 76,88 ****
  2966.   
  2967.   /* external data */
  2968. ! extern void AHIhookEntry();        /* hook stub */
  2969.   extern void Idle();            
  2970.   extern void InvertIdle();
  2971.   extern void PerfectIdle();
  2972. ! extern void Record();          /* prototype for assembly interrupt routine */
  2973.   extern void PerfectRecord();   /* prototype for assembly interrupt routine */
  2974.   
  2975.   extern BOOL BTransmitting, BSoundOn, BButtonHeld, BSpaceTapped, BTCPBatchXmit, BUserDebug;
  2976.   extern UBYTE ubSamplerType, ubInputChannel, ubCurrComp, ubInputSource;
  2977.   extern UBYTE ubCustStart, ubCustStop, ubCustLeft, ubCustRight, ubCustMic, ubCustExt, ubCustDir;
  2978.   extern UBYTE * pubCustSampleAt;
  2979. --- 83,96 ----
  2980.   
  2981.   /* external data */
  2982. ! extern void AHIhookEntry();        /* hook stub */
  2983.   extern void Idle();            
  2984.   extern void InvertIdle();
  2985.   extern void PerfectIdle();
  2986. ! extern void Record();           /* prototype for assembly interrupt routine */
  2987.   extern void PerfectRecord();   /* prototype for assembly interrupt routine */
  2988.   
  2989.   extern BOOL BTransmitting, BSoundOn, BButtonHeld, BSpaceTapped, BTCPBatchXmit, BUserDebug;
  2990.   extern UBYTE ubSamplerType, ubInputChannel, ubCurrComp, ubInputSource;
  2991. + extern ULONG ulAHIMode;
  2992.   extern UBYTE ubCustStart, ubCustStop, ubCustLeft, ubCustRight, ubCustMic, ubCustExt, ubCustDir;
  2993.   extern UBYTE * pubCustSampleAt;
  2994. ***************
  2995. *** 102,106 ****
  2996.   extern struct Library * AHIBase;
  2997.   extern struct Library * ToccataBase;
  2998. ! extern struct Library * DelfinaBase;
  2999.   
  3000.   /* data */
  3001. --- 110,119 ----
  3002.   extern struct Library * AHIBase;
  3003.   extern struct Library * ToccataBase;
  3004. ! extern struct Window *PhoneWindow;
  3005. ! extern BOOL BUpdateMenus;
  3006. ! extern struct Gadget *freqslider; 
  3007.   
  3008.   /* data */
  3009. ***************
  3010. *** 108,115 ****
  3011.   BYTE sighalf=0, sigfull=0;
  3012.   UBYTE * pubAllocedArray = NULL;
  3013. ! UBYTE * pubRightBuffer  = NULL;
  3014.   int nLineGainValue=0, nMicGainValue=20;
  3015.   UBYTE * pubBulkSamplePacket = NULL;
  3016. ! ULONG   ulBulkSamplePacketLen, ulBulkSamplePacketSum, ulAHIAudioMode = 0L;
  3017.   
  3018.   /* private data */
  3019. --- 121,129 ----
  3020.   BYTE sighalf=0, sigfull=0;
  3021.   UBYTE * pubAllocedArray = NULL;
  3022. ! UBYTE * pubRightBuffer    = NULL;
  3023.   int nLineGainValue=0, nMicGainValue=20;
  3024.   UBYTE * pubBulkSamplePacket = NULL;
  3025. ! ULONG    ulBulkSamplePacketLen, ulBulkSamplePacketSum;
  3026.   
  3027.   /* private data */
  3028. ***************
  3029. *** 121,124 ****
  3030. --- 135,139 ----
  3031.   static struct List * PreSendQueue = NULL;
  3032.   static int nCurrentPreSendQLen;
  3033. + static UBYTE * pubAHIRecordBuffer = NULL;
  3034.   
  3035.   /* private function prototypes */
  3036. ***************
  3037. *** 133,143 ****
  3038.   static void UpdatePreSendQueue(struct AmiPhoneSendBuffer * sBuf);
  3039.   static void FreePreSendNode(struct Node * current);
  3040.   
  3041.   /* Used by toccata & AHI samplers */
  3042. ! static __geta4 BOOL ToccataSendData(UBYTE * ubData, ULONG ulDataSize);
  3043. ! static __geta4 ULONG AHISendData(struct Hook *hook, struct AHIAudioCtrl * ctrl, struct AHIRecordMessage * msg);
  3044.   static BOOL StartToccataCapture(BOOL BStart, ULONG ulBPS);
  3045.   static BOOL StartAHICapture(BOOL BStart, ULONG ulBPS);
  3046. - static BOOL StartDelfinaCapture(BOOL BStart, ULONG ulBPS);
  3047.   
  3048.   /* Front-ends to setting the various data direction and control bits on the parallel port */
  3049. --- 148,159 ----
  3050.   static void UpdatePreSendQueue(struct AmiPhoneSendBuffer * sBuf);
  3051.   static void FreePreSendNode(struct Node * current);
  3052. + static ULONG ProcessAHIBuffer(UBYTE * pubSrc, UBYTE * pubDst, ULONG ulDataLen, ULONG ulType);
  3053. + static ULONG ProcessToccataBuffer(UBYTE * pubData, ULONG ulDataLen);
  3054.   
  3055.   /* Used by toccata & AHI samplers */
  3056. ! static SAVEDS BOOL ToccataSendData(UBYTE * ubData, ULONG ulDataSize);
  3057. ! static SAVEDS ULONG AHISendData(struct Hook *hook, struct AHIAudioCtrl * ctrl, struct AHIRecordMessage * msg);
  3058.   static BOOL StartToccataCapture(BOOL BStart, ULONG ulBPS);
  3059.   static BOOL StartAHICapture(BOOL BStart, ULONG ulBPS);
  3060.   
  3061.   /* Front-ends to setting the various data direction and control bits on the parallel port */
  3062. ***************
  3063. *** 147,157 ****
  3064.   static char * RegToString(UBYTE ubReg);
  3065.   
  3066. ! #define EVENT_NONE  0
  3067.   #define EVENT_START 1
  3068. ! #define EVENT_STOP  2
  3069. ! #define EVENT_LEFT  3
  3070.   #define EVENT_RIGHT 4
  3071. ! #define EVENT_MIC   5
  3072. ! #define EVENT_EXT   6
  3073.   
  3074.   char * szEventStrings[] = {
  3075. --- 163,173 ----
  3076.   static char * RegToString(UBYTE ubReg);
  3077.   
  3078. ! #define EVENT_NONE    0
  3079.   #define EVENT_START 1
  3080. ! #define EVENT_STOP    2
  3081. ! #define EVENT_LEFT    3
  3082.   #define EVENT_RIGHT 4
  3083. ! #define EVENT_MIC    5
  3084. ! #define EVENT_EXT    6
  3085.   
  3086.   char * szEventStrings[] = {
  3087. ***************
  3088. *** 172,182 ****
  3089.       ;
  3090.       ; STOP -
  3091. !     ;     START bit 0 == 0 (STOP IMMEDIATELY)
  3092. !     ;     PBON  bit 1 == same
  3093. !     ;     OUT   bit 2 == same
  3094. !     ;    RUN   bit 3 == 0 (SET CONTINUOUS MODE)
  3095.       ;    LOAD  bit 4 == 0 (NO FORCE LOAD)
  3096. !     ;    IN    bit 5 == 0 (COUNTS 02 PULSES)
  3097. !     ;    SP    bit 6 == same
  3098.       ;    TODIN bit 7 == same (unused on ciacra)
  3099.       ;
  3100. --- 188,198 ----
  3101.       ;
  3102.       ; STOP -
  3103. !     ;    START bit 0 == 0 (STOP IMMEDIATELY)
  3104. !     ;    PBON  bit 1 == same
  3105. !     ;    OUT      bit 2 == same
  3106. !     ;    RUN      bit 3 == 0 (SET CONTINUOUS MODE)
  3107.       ;    LOAD  bit 4 == 0 (NO FORCE LOAD)
  3108. !     ;    IN      bit 5 == 0 (COUNTS 02 PULSES)
  3109. !     ;    SP      bit 6 == same
  3110.       ;    TODIN bit 7 == same (unused on ciacra)
  3111.       ;
  3112. ***************
  3113. *** 191,201 ****
  3114.       ;
  3115.       ; STOP -
  3116. !     ;     START bit 0 == 0 (STOP IMMEDIATELY)
  3117. !     ;     PBON  bit 1 == same
  3118. !     ;     OUT   bit 2 == same
  3119. !     ;    RUN   bit 3 == 0 (SET CONTINUOUS MODE)
  3120.       ;    LOAD  bit 4 == 0 (NO FORCE LOAD)
  3121. !     ;    IN0   bit 5 == 0 (COUNTS 02 PULSES)
  3122. !     ;    IN1   bit 6 == 0 (COUNDS 02 PULSES)
  3123.       ;    ALARM bit 7 == same (TOD alarm control bit)
  3124.       ;
  3125. --- 207,217 ----
  3126.       ;
  3127.       ; STOP -
  3128. !     ;    START bit 0 == 0 (STOP IMMEDIATELY)
  3129. !     ;    PBON  bit 1 == same
  3130. !     ;    OUT      bit 2 == same
  3131. !     ;    RUN      bit 3 == 0 (SET CONTINUOUS MODE)
  3132.       ;    LOAD  bit 4 == 0 (NO FORCE LOAD)
  3133. !     ;    IN0      bit 5 == 0 (COUNTS 02 PULSES)
  3134. !     ;    IN1      bit 6 == 0 (COUNDS 02 PULSES)
  3135.       ;    ALARM bit 7 == same (TOD alarm control bit)
  3136.       ;
  3137. ***************
  3138. *** 268,272 ****
  3139.               case SAMPLER_SOMAGIC:
  3140.                   BWasInput = ((pciab->ciaddra & CIAF_PRTRBUSY) == 0);
  3141. !                      pciab->ciaddra &= ~(CIAF_PRTRBUSY); /* set this line to input so we can read it */
  3142.                   PrevSource = (pciab->ciapra & CIAF_PRTRBUSY) ? INPUT_SOURCE_EXT : INPUT_SOURCE_MIC;
  3143.                   UNLESS(BWasInput) pciab->ciaddra |= CIAF_PRTRBUSY;    /* put it back to original state */
  3144. --- 284,288 ----
  3145.               case SAMPLER_SOMAGIC:
  3146.                   BWasInput = ((pciab->ciaddra & CIAF_PRTRBUSY) == 0);
  3147. !                     pciab->ciaddra &= ~(CIAF_PRTRBUSY); /* set this line to input so we can read it */
  3148.                   PrevSource = (pciab->ciapra & CIAF_PRTRBUSY) ? INPUT_SOURCE_EXT : INPUT_SOURCE_MIC;
  3149.                   UNLESS(BWasInput) pciab->ciaddra |= CIAF_PRTRBUSY;    /* put it back to original state */
  3150. ***************
  3151. *** 293,297 ****
  3152.       
  3153.       if ((nNewSamplerType < 0)||(nNewSamplerType >= SAMPLER_MAX)) return;
  3154. -     if ((nNewSamplerType == SAMPLER_DELFINA)&&(!DelfinaBase)) return;
  3155.       if ((nNewSamplerType == SAMPLER_TOCCATA)&&(!ToccataBase)) return;
  3156.       if ((nNewSamplerType == SAMPLER_AHI)&&(!AHIBase)) return;
  3157. --- 309,312 ----
  3158. ***************
  3159. *** 303,309 ****
  3160. --- 318,454 ----
  3161.       ChangeInputSource(ubInputSource,TRUE);
  3162.   
  3163. +     BUpdateMenus = TRUE;
  3164. +     if(ubSamplerType == SAMPLER_AHI)
  3165. +     {
  3166. +         LONG freqs = 0, index = 0, inputs = 0;
  3167. +         int i;
  3168. +         
  3169. +         AHI_GetAudioAttrs(ulAHIMode, NULL,
  3170. +             AHIDB_Frequencies,    &freqs,
  3171. +             AHIDB_IndexArg,        ulBytesPerSecond,
  3172. +             AHIDB_Index,        &index,
  3173. +             AHIDB_FrequencyArg,    0,
  3174. +             AHIDB_Inputs        &inputs,
  3175. +             TAG_DONE);
  3176. +         /* Remove frequencies over nMaxSampleRate */
  3177. +         for( i = freqs; i > 0; i--)
  3178. +         {
  3179. +             LONG freq = 0;
  3180. +             AHI_GetAudioAttrs(ulAHIMode, NULL,
  3181. +                 AHIDB_FrequencyArg,    i,
  3182. +                 AHIDB_Frequency,    &freq,
  3183. +                 TAG_DONE);
  3184. +             
  3185. +             if(freq > nMaxSampleRate)
  3186. +             {
  3187. +                 freqs--;
  3188. +             }
  3189. +         }
  3190. +         /* Make sure the selected frequency is in range */
  3191. +         index = max(0, min(index, freqs - 1));
  3192. +         /* Set ulBytesPerSecond */
  3193. +         AHI_GetAudioAttrs(ulAHIMode, NULL,
  3194. +             AHIDB_FrequencyArg,    index,
  3195. +             AHIDB_Frequency,    &ulBytesPerSecond,
  3196. +             TAG_DONE);
  3197. +         /* Set frequency slider */
  3198. +         GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,
  3199. +             GTSL_Min,        0,
  3200. +             GTSL_Max,        freqs,
  3201. +             GTSL_Level,        index,
  3202. +             TAG_END);
  3203. +     }
  3204. +     else
  3205. +     {
  3206. +         GT_SetGadgetAttrs(freqslider,PhoneWindow,NULL,
  3207. +             GTSL_Min,        (WORD)MIN_SAMPLE_RATE,
  3208. +             GTSL_Max,        (WORD)nMaxSampleRate,
  3209. +             GTSL_Level,        (WORD)ulBytesPerSecond,
  3210. +             TAG_END);
  3211. +     }
  3212.       if (BWasTransmitting) ToggleMicButton(CODE_ON);
  3213.   }
  3214.   
  3215. + static struct TagItem ReqFilterTags[] =
  3216. + {
  3217. + //      AHIDB_Realtime,    TRUE,
  3218. +     AHIDB_Record,    TRUE,
  3219. +     TAG_DONE,        NULL
  3220. + };
  3221. + static ULONG ASMCALL SAVEDS
  3222. + ReqFunc( REG(a0, struct Hook *hook),
  3223. +          REG(a2, struct AHIAudioModeRequester *req),
  3224. +          REG(a1, ULONG id) )
  3225. + {
  3226. +     // Dirty! Filter all Paula modes away.
  3227. +     if((id & 0x001f0000) == 0x00020000) return 0;
  3228. +     return 1;
  3229. + }
  3230. + static struct Hook
  3231. + ReqHook = {
  3232. +     0, 0,
  3233. +     ReqFunc, NULL, NULL
  3234. + };
  3235. + void ChangeAHIMode(void)
  3236. + {
  3237. +     struct AHIAudioModeRequester *req;
  3238. +     BOOL rc = FALSE;
  3239. +     if(AHIBase == NULL) return;
  3240. +     req = AHI_AllocAudioRequest(
  3241. +         AHIR_Window,            PhoneWindow,
  3242. +         AHIR_SleepWindow,        TRUE,
  3243. +         AHIR_DoDefaultMode,        TRUE,
  3244. +         AHIR_InitialAudioID,    ulAHIMode,
  3245. +         AHIR_FilterTags,        ReqFilterTags,
  3246. +         AHIR_FilterFunc,        &ReqHook,
  3247. +         TAG_DONE);
  3248. +     if(req == NULL)
  3249. +     {
  3250. +         SetWindowTitle("Out of memory!");
  3251. +         return;
  3252. +     }
  3253. +     rc = AHI_AudioRequest(req, TAG_DONE);
  3254. +     if(!rc)
  3255. +     {
  3256. +         if(IoErr() == ERROR_NO_FREE_STORE)
  3257. +             SetWindowTitle("Out of memory!");
  3258. +         else if(IoErr() == ERROR_NO_MORE_ENTRIES)
  3259. +             SetWindowTitle("No available modes!");
  3260. +     }
  3261. +     else
  3262. +     {
  3263. +         ulAHIMode = req->ahiam_AudioID;
  3264. +         ubInputSource = 0;
  3265. +         BUpdateMenus = TRUE;
  3266. +     }
  3267. +     AHI_FreeAudioRequest(req);
  3268. +     /* Update */
  3269. +     ChangeSamplerType(ubSamplerType);
  3270. + }
  3271.   
  3272.       
  3273. ***************
  3274. *** 311,330 ****
  3275.   {
  3276.       struct TagItem taglist[3];
  3277. !     
  3278. !     if (BMakeCurrentMode) ubInputSource = nNewSource;
  3279.       
  3280.       switch(ubSamplerType)
  3281.       {
  3282.           case SAMPLER_TOCCATA:
  3283. !             taglist[0].ti_Tag  = PAT_Input;        
  3284.               switch (ubInputSource)
  3285.               {
  3286. !                 case INPUT_SOURCE_MIC: taglist[0].ti_Data = TINPUT_Mic;  break;
  3287.                   case INPUT_SOURCE_EXT: taglist[0].ti_Data = TINPUT_Line; break;
  3288.               }
  3289. !             taglist[1].ti_Tag  = TAG_DONE;    taglist[1].ti_Data = NULL;
  3290.               T_SetPart(taglist);
  3291.               break;
  3292. !         
  3293.           case SAMPLER_SOMAGIC:
  3294.               switch(nNewSource)
  3295. --- 456,493 ----
  3296.   {
  3297.       struct TagItem taglist[3];
  3298. !     if(nNewSource < 0) nNewSource = 0;
  3299.       
  3300.       switch(ubSamplerType)
  3301.       {
  3302.           case SAMPLER_TOCCATA:
  3303. !             taglist[0].ti_Tag  = PAT_Input;           
  3304.               switch (ubInputSource)
  3305.               {
  3306. !                 case INPUT_SOURCE_MIC: taglist[0].ti_Data = TINPUT_Mic;     break;
  3307.                   case INPUT_SOURCE_EXT: taglist[0].ti_Data = TINPUT_Line; break;
  3308.               }
  3309. !             taglist[1].ti_Tag  = TAG_DONE;    taglist[1].ti_Data = 0;
  3310.               T_SetPart(taglist);
  3311.               break;
  3312. !         case SAMPLER_AHI:
  3313. !         {
  3314. !             ULONG inputs = 0;
  3315. !             AHI_GetAudioAttrs( ulAHIMode, NULL,
  3316. !                 AHIDB_Inputs, &inputs,
  3317. !                 TAG_DONE);
  3318. !             nNewSource = max(0, min(nNewSource, inputs - 1));
  3319. !             if(AHIAudioControl)
  3320. !             {
  3321. !                 AHI_ControlAudio(AHIAudioControl, 
  3322. !                     AHIC_Input, nNewSource,
  3323. !                     TAG_DONE);
  3324. !             }
  3325. !         }
  3326.           case SAMPLER_SOMAGIC:
  3327.               switch(nNewSource)
  3328. ***************
  3329. *** 335,345 ****
  3330.               break;
  3331.       
  3332. -         case SAMPLER_DELFINA:
  3333. -             taglist[0].ti_Tag = DA_MicIn;    taglist[0].ti_Data = (nNewSource == INPUT_SOURCE_MIC);
  3334. -             taglist[1].ti_Tag = DA_LineIn;    taglist[1].ti_Data = (nNewSource == INPUT_SOURCE_EXT);
  3335. -             taglist[2].ti_Tag = TAG_DONE;    taglist[2].ti_Data = NULL;
  3336. -             Delf_SetAttrsA(taglist);
  3337. -             break;
  3338. -                 
  3339.           case SAMPLER_CUSTOM:
  3340.               switch(ubInputSource)
  3341. --- 498,501 ----
  3342. ***************
  3343. *** 349,352 ****
  3344. --- 505,510 ----
  3345.               }
  3346.       }
  3347. +     if (BMakeCurrentMode) ubInputSource = nNewSource;
  3348.   }
  3349.   
  3350. ***************
  3351. *** 361,371 ****
  3352.                    break;
  3353.                           
  3354. !             case SAMPLER_GVPDSS8:     /* this verified to work by JAF */
  3355.                    SetParallelBits(EVENT_NONE,SAMPBIT_SELSET);
  3356. !                    break;        
  3357.                    
  3358.               case SAMPLER_SOMAGIC:
  3359.                    SetParallelBits(EVENT_NONE,SAMPBIT_POUTCLR | SAMPBIT_SELSET);
  3360. !                   break;
  3361.   
  3362.               case SAMPLER_AURA:
  3363. --- 519,529 ----
  3364.                    break;
  3365.                           
  3366. !             case SAMPLER_GVPDSS8:    /* this verified to work by JAF */
  3367.                    SetParallelBits(EVENT_NONE,SAMPBIT_SELSET);
  3368. !                  break;        
  3369.                    
  3370.               case SAMPLER_SOMAGIC:
  3371.                    SetParallelBits(EVENT_NONE,SAMPBIT_POUTCLR | SAMPBIT_SELSET);
  3372. !                  break;
  3373.   
  3374.               case SAMPLER_AURA:
  3375. ***************
  3376. *** 378,390 ****
  3377.                    break;        
  3378.               
  3379. -             case SAMPLER_DELFINA:
  3380. -                  if (StartSampling(CHECK_STATUS,0) == TRUE) 
  3381. -                  {
  3382. -                     ubInputChannel = INPUT_JACK_LEFT;    /* must be set BEFORE the StartSampling pair! */
  3383. -                     BTransmitting = StartSampling(FALSE,0);
  3384. -                     BTransmitting = StartSampling(TRUE,ulBytesPerSecond);
  3385. -                  }
  3386. -                  break;
  3387. -                                       
  3388.               default: case SAMPLER_PERFECT: case SAMPLER_AMAS: 
  3389.                    /* as described by Marcel Offermans & AGMSRecordSound author */
  3390. --- 536,539 ----
  3391. ***************
  3392. *** 400,412 ****
  3393.                    break;
  3394.               
  3395. -             case SAMPLER_DELFINA:
  3396. -                  if (StartSampling(CHECK_STATUS,0) == TRUE) 
  3397. -                  {
  3398. -                     ubInputChannel = INPUT_JACK_RIGHT;    /* must be set BEFORE the StartSampling pair! */
  3399. -                     BTransmitting = StartSampling(FALSE,0);
  3400. -                     BTransmitting = StartSampling(TRUE,ulBytesPerSecond);
  3401. -                  }
  3402. -                  break;                          
  3403.               case SAMPLER_GVPDSS8: 
  3404.                    SetParallelBits(EVENT_NONE, SAMPBIT_SELCLR);
  3405. --- 549,552 ----
  3406. ***************
  3407. *** 425,429 ****
  3408.                    if (pubCustSampleAt) IntData.pubSampleAt = pubCustSampleAt;
  3409.                    break;
  3410. !                                   
  3411.               default: case SAMPLER_PERFECT: case SAMPLER_AMAS: 
  3412.                    SetParallelBits(EVENT_NONE, SAMPBIT_POUTCLR | SAMPBIT_SELSET);
  3413. --- 565,569 ----
  3414.                    if (pubCustSampleAt) IntData.pubSampleAt = pubCustSampleAt;
  3415.                    break;
  3416. !                                  
  3417.               default: case SAMPLER_PERFECT: case SAMPLER_AMAS: 
  3418.                    SetParallelBits(EVENT_NONE, SAMPBIT_POUTCLR | SAMPBIT_SELSET);
  3419. ***************
  3420. *** 455,460 ****
  3421.       if (ubSamplerType == SAMPLER_AHI) return(BTimerStarted = StartAHICapture(BStart, ulBPS));
  3422.       
  3423. -     if (ubSamplerType == SAMPLER_DELFINA) return(BTimerStarted = StartDelfinaCapture(BStart, ulBPS));
  3424. -     
  3425.       /* set up data which will be passed to interrupt */
  3426.       if (BStart == TRUE)
  3427. --- 595,598 ----
  3428. ***************
  3429. *** 465,469 ****
  3430.           {
  3431.               ResetDigitizer(FALSE);    /* record state */
  3432. !             BFirstTime = FALSE;    
  3433.           }
  3434.           
  3435. --- 603,607 ----
  3436.           {
  3437.               ResetDigitizer(FALSE);    /* record state */
  3438. !             BFirstTime = FALSE; 
  3439.           }
  3440.           
  3441. ***************
  3442. *** 476,481 ****
  3443.           AmiPhoneTimer.timerint.is_Node.ln_Pri  = 0;
  3444.           AmiPhoneTimer.timerint.is_Node.ln_Name = "AmiPhone Sample Timer";
  3445. !         AmiPhoneTimer.timerint.is_Data           = (APTR) &IntData;
  3446. !         AmiPhoneTimer.timerint.is_Code           = (ubSamplerType == SAMPLER_PERFECT) ? PerfectIdle : ((UsesInvertedSamples()) ? InvertIdle : Idle);
  3447.           
  3448.           /* Call function to find a free CIA interval timer
  3449. --- 614,619 ----
  3450.           AmiPhoneTimer.timerint.is_Node.ln_Pri  = 0;
  3451.           AmiPhoneTimer.timerint.is_Node.ln_Name = "AmiPhone Sample Timer";
  3452. !         AmiPhoneTimer.timerint.is_Data           = (APTR) &IntData;
  3453. !         AmiPhoneTimer.timerint.is_Code           = (ubSamplerType == SAMPLER_PERFECT) ? PerfectIdle : ((UsesInvertedSamples()) ? InvertIdle : Idle);
  3454.           
  3455.           /* Call function to find a free CIA interval timer
  3456. ***************
  3457. *** 517,521 ****
  3458.   
  3459.           /* Send what we have of the current packet, if we were sending */
  3460. !         pubPartialSend     = (IntData.pubIndex >= IntData.pubHalfIndex) ? IntData.pubHalfIndex : IntData.pubArray;
  3461.           nPartialSendLength = (int) (IntData.pubIndex-pubPartialSend);
  3462.           if (nPartialSendLength == 0) nPartialSendLength = 1;
  3463. --- 655,659 ----
  3464.   
  3465.           /* Send what we have of the current packet, if we were sending */
  3466. !         pubPartialSend       = (IntData.pubIndex >= IntData.pubHalfIndex) ? IntData.pubHalfIndex : IntData.pubArray;
  3467.           nPartialSendLength = (int) (IntData.pubIndex-pubPartialSend);
  3468.           if (nPartialSendLength == 0) nPartialSendLength = 1;
  3469. ***************
  3470. *** 523,527 ****
  3471.           /* pro-rate the partial sample's volume to represent the full range */
  3472.           IntData.ulSaveByteSum = ((ULONG) (IntData.ulByteSum * ((ULONG)(IntData.pubHalfIndex-IntData.pubArray)))) / ((ULONG) nPartialSendLength);
  3473. !         TransmitData(pubPartialSend, nPartialSendLength, ubCurrComp);                
  3474.           
  3475.           /* Deallocate any RAM that was previously allocated */
  3476. --- 661,665 ----
  3477.           /* pro-rate the partial sample's volume to represent the full range */
  3478.           IntData.ulSaveByteSum = ((ULONG) (IntData.ulByteSum * ((ULONG)(IntData.pubHalfIndex-IntData.pubArray)))) / ((ULONG) nPartialSendLength);
  3479. !         TransmitData(pubPartialSend, nPartialSendLength, ubCurrComp);                
  3480.           
  3481.           /* Deallocate any RAM that was previously allocated */
  3482. ***************
  3483. *** 531,535 ****
  3484.       }
  3485.       return(BTimerStarted);
  3486. ! };
  3487.   
  3488.   
  3489. --- 669,673 ----
  3490.       }
  3491.       return(BTimerStarted);
  3492. ! }
  3493.   
  3494.   
  3495. ***************
  3496. *** 539,622 ****
  3497.   static BOOL StartAHICapture(BOOL BStart, ULONG ulBPS)
  3498.   {
  3499. -     struct TagItem taglist[15];
  3500.       static struct Hook RecordFuncHook;
  3501. !     ULONG ulAHIVolume,ulAHIRecord,ulAHIRealtime,ulAHIBits,ulAHIFrequencies,
  3502. !           ulAHIIndex,ulAHIMaxRecordSamples,ulBestAudioMode, ulError;
  3503. !     char szDriverName[200] = "szDriverName",
  3504. !          szModeName[200]   = "szModeName",
  3505. !          szAuthorName[200] = "szAuthorName",
  3506. !          szVersionName[200]= "szVersionName";
  3507.       
  3508.       if (BStart)
  3509.       {
  3510. !         printf("StartAHICapture():  Setting up capture....\n");
  3511. !         
  3512. !         taglist[0].ti_Tag = AHIDB_Record; taglist[0].ti_Data = TRUE;
  3513. !         taglist[1].ti_Tag = AHIDB_Bits;   taglist[1].ti_Data = 8;
  3514. !         taglist[2].ti_Tag = TAG_DONE;      taglist[2].ti_Data = NULL;
  3515. !         ulBestAudioMode = AHI_BestAudioIDA(taglist);
  3516. !         
  3517. !         printf("ulBestAudioMode is 0x%X\n",ulBestAudioMode);
  3518. !         if (ulBestAudioMode == AHI_INVALID_ID) printf("Warning, INVALID ID!\n");
  3519. !         
  3520. !         taglist[0].ti_Tag  = AHIDB_Volume;     taglist[0].ti_Data  = &ulAHIVolume;
  3521. !         taglist[1].ti_Tag  = AHIDB_Record;     taglist[1].ti_Data  = &ulAHIRecord;
  3522. !         taglist[2].ti_Tag  = AHIDB_Realtime;     taglist[2].ti_Data  = &ulAHIRealtime;
  3523. !         taglist[3].ti_Tag  = AHIDB_Bits;     taglist[3].ti_Data  = &ulAHIBits;
  3524. !         taglist[4].ti_Tag  = AHIDB_Frequencies; taglist[4].ti_Data  = &ulAHIFrequencies;
  3525. !         taglist[5].ti_Tag  = AHIDB_Index;     taglist[5].ti_Data  = &ulAHIIndex;
  3526. !         taglist[6].ti_Tag  = AHIDB_IndexArg;     taglist[6].ti_Data  = ulBPS;
  3527. !         taglist[7].ti_Tag  = AHIDB_MaxRecordSamples; taglist[7].ti_Data = &ulAHIMaxRecordSamples;
  3528. !         taglist[8].ti_Tag  = AHIDB_BufferLen;   taglist[8].ti_Data  = sizeof(szDriverName);
  3529. !         taglist[9].ti_Tag  = AHIDB_Driver;     taglist[9].ti_Data  = szDriverName;
  3530. !         taglist[10].ti_Tag = AHIDB_Name;     taglist[10].ti_Data = szModeName;
  3531. !         taglist[11].ti_Tag = AHIDB_Author;     taglist[11].ti_Data = szAuthorName;
  3532. !         taglist[12].ti_Tag = AHIDB_Version;    taglist[12].ti_Data = szVersionName;
  3533. !         taglist[13].ti_Tag = TAG_DONE;         taglist[13].ti_Data = NULL;
  3534. !         UNLESS(AHI_GetAudioAttrsA(ulBestAudioMode, NULL, taglist))
  3535.           {
  3536. !             printf("AHI_GetAudioAttrsA failed!\n");
  3537.               return(FALSE);
  3538.           }
  3539.   
  3540. !         printf("---------AHI_GetAudioAttrs reports:\n");
  3541. !         printf("VolumeAdjustable = %lu\n",ulAHIVolume);
  3542. !         printf("CanRecord        = %lu\n",ulAHIRecord);
  3543. !         printf("Realtime         = %lu\n",ulAHIRealtime);
  3544. !         printf("BitsPerSample    = %lu\n",ulAHIBits);
  3545. !         printf("NumFrequencies   = %lu\n",ulAHIFrequencies);
  3546. !         printf("IndexOf(f=%lu)   = %lu\n",ulBPS,ulAHIIndex);
  3547. !         printf("MaxRecordSamples = %lu\n",ulAHIMaxRecordSamples);
  3548. !         printf("szDriverName  = [%s]\n",szDriverName);
  3549. !         printf("szModeName    = [%s]\n",szModeName);
  3550. !         printf("szAuthorName  = [%s]\n",szAuthorName);
  3551. !         printf("szVersionName = [%s]\n",szVersionName);
  3552. !         printf("---------End AHI_GetAudioAttrs\n");
  3553.   
  3554. !         /* Setup our Hook! */
  3555. !         RecordFuncHook.h_Entry    = (ULONG (*) ()) AHIhookEntry;
  3556. !         RecordFuncHook.h_SubEntry = AHISendData;
  3557. !         RecordFuncHook.h_Data      = NULL;    /* Should there be something here? */
  3558. !         
  3559. !         /* Now start the capture */
  3560. !         taglist[0].ti_Tag = AHIA_AudioID;     taglist[0].ti_Data = ulBestAudioMode;
  3561. !         taglist[1].ti_Tag = AHIA_Channels;    taglist[1].ti_Data = 0;    /* Is zero channels okay since we won't be playing any sounds?? */
  3562. !         taglist[2].ti_Tag = AHIA_Sounds;      taglist[2].ti_Data = 0;    /* What is this arg, anyway??? */
  3563. !         taglist[3].ti_Tag = AHIA_RecordFunc;    taglist[3].ti_Data = &RecordFuncHook;
  3564. !         taglist[4].ti_Tag = TAG_DONE;          taglist[4].ti_Data = NULL;
  3565. !         UNLESS(AHIAudioControl = AHI_AllocAudioA(taglist))
  3566.           {
  3567. !             SetWindowTitle("AHI_AllocAudioA failed!");
  3568.               return(FALSE);
  3569.           }
  3570. !         ulAHIAudioMode = ulBestAudioMode;
  3571. !         
  3572. !         taglist[0].ti_Tag = AHIC_Play;         taglist[0].ti_Data = FALSE;
  3573. !         taglist[1].ti_Tag = AHIC_Record;    taglist[1].ti_Data = TRUE;
  3574. !         taglist[2].ti_Tag = AHIA_RecordFunc;    taglist[2].ti_Data = &RecordFuncHook;
  3575. !         taglist[3].ti_Tag = TAG_DONE;          taglist[3].ti_Data = NULL;
  3576. !         if (ulError = AHI_ControlAudioA(AHIAudioControl, taglist))
  3577.           {
  3578. !             printf("AHI_ControlAudioA failed, error %lu\n",ulError);
  3579.               AHI_FreeAudio(AHIAudioControl); AHIAudioControl = NULL;
  3580.               return(FALSE);
  3581. --- 677,728 ----
  3582.   static BOOL StartAHICapture(BOOL BStart, ULONG ulBPS)
  3583.   {
  3584.       static struct Hook RecordFuncHook;
  3585. !     ULONG ulError = AHIE_OK;
  3586. !     ULONG inputs = 0, samples = 0;
  3587.       
  3588. +     if(AHIBase == NULL) return FALSE;
  3589.       if (BStart)
  3590.       {
  3591. !         /* Setup our Hook! */
  3592. !         RecordFuncHook.h_Entry      = (ULONG (*) ()) AHIhookEntry;
  3593. !         RecordFuncHook.h_SubEntry = AHISendData;
  3594. !         RecordFuncHook.h_Data      = NULL;    /* Should there be something here? */
  3595. !         /* Now start the capture */
  3596. !         UNLESS(AHIAudioControl = AHI_AllocAudio(
  3597. !             AHIA_AudioID,        ulAHIMode,
  3598. !             AHIA_MixFreq,        ulBytesPerSecond,
  3599. !             AHIA_Channels,        1,
  3600. !             AHIA_Sounds,        1,
  3601. !             AHIA_RecordFunc,    &RecordFuncHook,
  3602. !             TAG_DONE))
  3603.           {
  3604. !             SetWindowTitle("AHI_AllocAudio failed!");
  3605.               return(FALSE);
  3606.           }
  3607.   
  3608. !         AHI_GetAudioAttrs( AHI_INVALID_ID, AHIAudioControl,
  3609. !             AHIDB_Inputs,            &inputs,
  3610. !             AHIDB_MaxRecordSamples, &samples,
  3611. !             TAG_DONE);
  3612.   
  3613. !         pubAHIRecordBuffer = AllocVec(samples, MEMF_PUBLIC);
  3614. !         if(pubAHIRecordBuffer == NULL)
  3615.           {
  3616. !             printf("Out of memory!\n");
  3617. !             AHI_FreeAudio(AHIAudioControl); AHIAudioControl = NULL;
  3618.               return(FALSE);
  3619.           }
  3620. !         ubInputSource = min(ubInputSource, inputs - 1);
  3621. !         if (ulError = AHI_ControlAudio(AHIAudioControl, 
  3622. !             AHIC_Record,    TRUE,
  3623. !             AHIC_Input,        ubInputSource,
  3624. !             TAG_DONE))
  3625.           {
  3626. !             printf("AHI_ControlAudio failed, error %lu\n",ulError);
  3627.               AHI_FreeAudio(AHIAudioControl); AHIAudioControl = NULL;
  3628.               return(FALSE);
  3629. ***************
  3630. *** 626,639 ****
  3631.       else
  3632.       {
  3633. -         printf("StartAHICapture():  Ending capture....\n");
  3634.           if (AHIAudioControl)
  3635.           {
  3636. !             taglist[0].ti_Tag = AHIC_Play;         taglist[0].ti_Data = FALSE;
  3637. !             taglist[1].ti_Tag = AHIC_Record;    taglist[1].ti_Data = FALSE;
  3638. !             taglist[2].ti_Tag = TAG_DONE;          taglist[2].ti_Data = NULL;
  3639. !             if (ulError = AHI_ControlAudioA(AHIAudioControl, taglist))
  3640. !                 printf("AHI_ControlAudioA failed on stop, error %lu\n",ulError);
  3641.               AHI_FreeAudio(AHIAudioControl); 
  3642.               AHIAudioControl = NULL;
  3643.           }
  3644.           else printf("Um, AHIAudioControl was like, NULL or something\n");
  3645. --- 732,746 ----
  3646.       else
  3647.       {
  3648.           if (AHIAudioControl)
  3649.           {
  3650. !             if (ulError = AHI_ControlAudio(AHIAudioControl,
  3651. !                 AHIC_Record,    FALSE,
  3652. !                 TAG_DONE))
  3653. !                 printf("AHI_ControlAudio failed on stop, error %lu\n",ulError);
  3654.               AHI_FreeAudio(AHIAudioControl); 
  3655.               AHIAudioControl = NULL;
  3656. +             FreeVec(pubAHIRecordBuffer);
  3657. +             pubAHIRecordBuffer = NULL;
  3658.           }
  3659.           else printf("Um, AHIAudioControl was like, NULL or something\n");
  3660. ***************
  3661. *** 645,688 ****
  3662.   
  3663.   
  3664. - /* Returns current state of the delfina sampler after operation attempted! */
  3665. - static BOOL StartDelfinaCapture(BOOL BStart, ULONG ulBPS)
  3666. - {
  3667. -     int compmode;
  3668. -     
  3669. -     if (BStart)
  3670. -     {
  3671. -         UNLESS(DelfinaBase) return(FALSE);
  3672. -         ulSampleArraySize = ((CalcSampleArraySize(ulBPS, ubCurrComp, fPacketDelay) >> 4)+1)<<3;
  3673. -         switch(ubCurrComp)
  3674. -         {
  3675. -             case COMPRESS_ADPCM2:    compmode = 1; break;
  3676. -             case COMPRESS_ADPCM3:    compmode = 2; break;
  3677. -             default:                compmode = 0; break;
  3678. -         }
  3679. -         /* Now allocate a buffer for us.  The >>3 is due to warts in AllocSamplingBuffer (read its header for more info) */
  3680. -         UNLESS(AllocSamplingBuffer(ulSampleArraySize>>3))
  3681. -         {
  3682. -             printf("StartDelfinaCapture():  Couldn't allocate sampling buffer!\n");
  3683. -             return(FALSE);
  3684. -         }
  3685. -         UNLESS(StartDelfina(ulBPS, ulSampleArraySize, compmode, (ubInputChannel == INPUT_JACK_RIGHT)))
  3686. -         {
  3687. -             printf("StartDelfinaCapture(): StartDelfina() failed!\n");
  3688. -             AllocSamplingBuffer(0);
  3689. -             return(FALSE);
  3690. -         }
  3691. -         return(TRUE);
  3692. -     }
  3693. -     else
  3694. -     {
  3695. -         StopDelfina();
  3696. -         AllocSamplingBuffer(0);    /* Free the mem we were using */
  3697. -         return(FALSE);
  3698. -     }    
  3699. - }
  3700.   /* BSTart controls whether to start or stop capture.  ulBPS is, of course,
  3701.      the sampling rate (for the Toccata, this should be set to one of the
  3702. --- 752,755 ----
  3703. ***************
  3704. *** 724,733 ****
  3705.           /* Prepare taglist to send to T_Capture */
  3706.           taglist[0].ti_Tag  = TT_BufferSize; taglist[0].ti_Data = ulTocArraySize;
  3707. !         taglist[1].ti_Tag  = TT_Save;        taglist[1].ti_Data = ToccataSendData;
  3708. !         taglist[2].ti_Tag  = TT_Mode;        taglist[2].ti_Data = TMODE_LINEAR_8;
  3709. !         taglist[3].ti_Tag  = TT_Frequency;  taglist[3].ti_Data = ulBPS;
  3710. !         taglist[4].ti_Tag  = TT_ErrorTask;  taglist[4].ti_Data = MainTask;
  3711. !         taglist[5].ti_Tag  = TT_ErrorMask;  taglist[5].ti_Data = SIGBREAKF_CTRL_D;
  3712. !         taglist[6].ti_Tag  = TAG_DONE;        taglist[6].ti_Data = NULL;
  3713.   
  3714.           /* and off it goes! */
  3715. --- 791,800 ----
  3716.           /* Prepare taglist to send to T_Capture */
  3717.           taglist[0].ti_Tag  = TT_BufferSize; taglist[0].ti_Data = ulTocArraySize;
  3718. !         taglist[1].ti_Tag  = TT_Save;        taglist[1].ti_Data = ToccataSendData;
  3719. !         taglist[2].ti_Tag  = TT_Mode;        taglist[2].ti_Data = TMODE_LINEAR_8;
  3720. !         taglist[3].ti_Tag  = TT_Frequency;    taglist[3].ti_Data = ulBPS;
  3721. !         taglist[4].ti_Tag  = TT_ErrorTask;    taglist[4].ti_Data = MainTask;
  3722. !         taglist[5].ti_Tag  = TT_ErrorMask;    taglist[5].ti_Data = SIGBREAKF_CTRL_D;
  3723. !         taglist[6].ti_Tag  = TAG_DONE;        taglist[6].ti_Data = 0;
  3724.   
  3725.           /* and off it goes! */
  3726. ***************
  3727. *** 753,762 ****
  3728.   
  3729.   /* Called by AHI whenever data is to be xmitted */    
  3730. ! static __geta4 ULONG AHISendData(struct Hook *hook, struct AHIAudioCtrl * ctrl, struct AHIRecordMessage * msg)
  3731.   {
  3732. !     pubBulkSamplePacket   = msg->ahirm_Buffer; 
  3733. !     ulSampleArraySize     = msg->ahirm_Length;
  3734.   
  3735. !     ulBulkSamplePacketSum = ProcessAHIBuffer(pubBulkSamplePacket, &ulSampleArraySize, msg->ahirm_Type);
  3736.       Signal(MainTask, SIGBREAKF_CTRL_F);
  3737.       return(1);
  3738. --- 820,830 ----
  3739.   
  3740.   /* Called by AHI whenever data is to be xmitted */    
  3741. ! static SAVEDS ULONG AHISendData(struct Hook *hook, struct AHIAudioCtrl * ctrl, struct AHIRecordMessage * msg)
  3742.   {
  3743. !     pubBulkSamplePacket      = pubAHIRecordBuffer;
  3744. !     ulSampleArraySize      = msg->ahirm_Length;
  3745.   
  3746. !     ulBulkSamplePacketSum = ProcessAHIBuffer(msg->ahirm_Buffer, 
  3747. !          pubBulkSamplePacket, ulSampleArraySize, msg->ahirm_Type);
  3748.       Signal(MainTask, SIGBREAKF_CTRL_F);
  3749.       return(1);
  3750. ***************
  3751. *** 765,772 ****
  3752.   
  3753.   /* called by the Toccata library whenever we need to send the data */
  3754. ! static __geta4 BOOL ToccataSendData(UBYTE * pubData, ULONG ulDataSize)
  3755.   {    
  3756. !     pubBulkSamplePacket   = pubData;
  3757. !     ulSampleArraySize     = ulDataSize;
  3758.   
  3759.       ulBulkSamplePacketSum = ProcessToccataBuffer(pubData, ulDataSize);
  3760. --- 833,840 ----
  3761.   
  3762.   /* called by the Toccata library whenever we need to send the data */
  3763. ! static SAVEDS BOOL ToccataSendData(UBYTE * pubData, ULONG ulDataSize)
  3764.   {    
  3765. !     pubBulkSamplePacket      = pubData;
  3766. !     ulSampleArraySize      = ulDataSize;
  3767.   
  3768.       ulBulkSamplePacketSum = ProcessToccataBuffer(pubData, ulDataSize);
  3769. ***************
  3770. *** 789,804 ****
  3771.       switch(ubSamplerType)
  3772.       {
  3773. -        case SAMPLER_DELFINA:
  3774. -         nLineGainValue = ChopValue(nLineGainValue+nSteps,0,15);
  3775. -         taglist[0].ti_Tag = DA_InputGain;    taglist[0].ti_Data = (nLineGainValue * 0x10000)/15;
  3776. -         taglist[1].ti_Tag = TAG_DONE;        taglist[1].ti_Data = NULL;
  3777. -         Delf_SetAttrsA(taglist);
  3778. -         break;
  3779. -         
  3780.          case SAMPLER_TOCCATA:
  3781. !         nLineGainValue = ChopValue(nLineGainValue+nSteps,0,15);    
  3782.           taglist[0].ti_Tag  = PAT_InputVolumeRight; taglist[0].ti_Data = nLineGainValue;
  3783.           taglist[1].ti_Tag  = PAT_InputVolumeLeft;  taglist[1].ti_Data = nLineGainValue;
  3784. !         taglist[2].ti_Tag  = TAG_DONE;            taglist[2].ti_Data = NULL;
  3785.           T_SetPart(taglist);
  3786.           break;
  3787. --- 857,865 ----
  3788.       switch(ubSamplerType)
  3789.       {
  3790.          case SAMPLER_TOCCATA:
  3791. !         nLineGainValue = ChopValue(nLineGainValue+nSteps,0,15); 
  3792.           taglist[0].ti_Tag  = PAT_InputVolumeRight; taglist[0].ti_Data = nLineGainValue;
  3793.           taglist[1].ti_Tag  = PAT_InputVolumeLeft;  taglist[1].ti_Data = nLineGainValue;
  3794. !         taglist[2].ti_Tag  = TAG_DONE;           taglist[2].ti_Data = 0;
  3795.           T_SetPart(taglist);
  3796.           break;
  3797. ***************
  3798. *** 806,810 ****
  3799.          case SAMPLER_GVPDSS8:
  3800.           nLineGainValue = ChopValue(nLineGainValue+nSteps,0,7);
  3801. !             pciaa->ciaddrb  = 0xFF;    /* set data direction bits to output */
  3802.           SetDirectionBits(SAMPBIT_BUSYSET);    /* busy bit as output */
  3803.           SetParallelBits(EVENT_NONE, SAMPBIT_BUSYCLR);
  3804. --- 867,871 ----
  3805.          case SAMPLER_GVPDSS8:
  3806.           nLineGainValue = ChopValue(nLineGainValue+nSteps,0,7);
  3807. !             pciaa->ciaddrb    = 0xFF; /* set data direction bits to output */
  3808.           SetDirectionBits(SAMPBIT_BUSYSET);    /* busy bit as output */
  3809.           SetParallelBits(EVENT_NONE, SAMPBIT_BUSYCLR);
  3810. ***************
  3811. *** 812,816 ****
  3812.           SetParallelBits(EVENT_NONE, SAMPBIT_BUSYSET);
  3813.           SetDirectionBits(SAMPBIT_BUSYCLR);
  3814. !             pciaa->ciaddrb  = 0x00;    /* data back to input */
  3815.           break;
  3816.           
  3817. --- 873,877 ----
  3818.           SetParallelBits(EVENT_NONE, SAMPBIT_BUSYSET);
  3819.           SetDirectionBits(SAMPBIT_BUSYCLR);
  3820. !             pciaa->ciaddrb    = 0x00; /* data back to input */
  3821.           break;
  3822.           
  3823. ***************
  3824. *** 823,834 ****
  3825.               /* Set SEL to 0 for decrease, 1 for increase */
  3826.               if (BRaise == TRUE) SetParallelBits(EVENT_NONE,SAMPBIT_SELSET);
  3827. !                        else SetParallelBits(EVENT_NONE,SAMPBIT_SELCLR);
  3828.                   
  3829.               /* Now toggle PB7 */
  3830. !                 pciaa->ciaprb  &= ~(0x80);    /* Gain control goes to zero */
  3831.               Delay(1);
  3832. !                 pciaa->ciaprb  |= 0x80;        /* And back to one.  This is the trigger. */
  3833.           }
  3834. !         ChangeInputChannel(ubInputChannel);    
  3835.           break;
  3836.       }
  3837. --- 884,895 ----
  3838.               /* Set SEL to 0 for decrease, 1 for increase */
  3839.               if (BRaise == TRUE) SetParallelBits(EVENT_NONE,SAMPBIT_SELSET);
  3840. !                        else SetParallelBits(EVENT_NONE,SAMPBIT_SELCLR);
  3841.                   
  3842.               /* Now toggle PB7 */
  3843. !                 pciaa->ciaprb  &= ~(0x80);    /* Gain control goes to zero */
  3844.               Delay(1);
  3845. !                 pciaa->ciaprb  |= 0x80;        /* And back to one.     This is the trigger. */
  3846.           }
  3847. !         ChangeInputChannel(ubInputChannel); 
  3848.           break;
  3849.       }
  3850. ***************
  3851. *** 850,863 ****
  3852.       switch(ubSamplerType)
  3853.       {
  3854. -        case SAMPLER_DELFINA:
  3855. -         taglist[0].ti_Tag = DA_MicIsLine;    taglist[0].ti_Data = (nNewValue==0);
  3856. -         taglist[1].ti_Tag = DA_HighPass;    taglist[1].ti_Data = (nNewValue==20);
  3857. -         taglist[2].ti_Tag = TAG_DONE;        taglist[2].ti_Data = NULL;
  3858. -         Delf_SetAttrsA(taglist);
  3859. -         break;
  3860.          case SAMPLER_TOCCATA:
  3861. !         taglist[0].ti_Tag  = PAT_MicGain;       taglist[0].ti_Data = (nNewValue > 0);
  3862. !         taglist[1].ti_Tag  = TAG_DONE;         taglist[1].ti_Data = NULL;
  3863.           T_SetPart(taglist);
  3864.           break;
  3865. --- 911,917 ----
  3866.       switch(ubSamplerType)
  3867.       {
  3868.          case SAMPLER_TOCCATA:
  3869. !         taglist[0].ti_Tag  = PAT_MicGain;        taglist[0].ti_Data = (nNewValue > 0);
  3870. !         taglist[1].ti_Tag  = TAG_DONE;        taglist[1].ti_Data = 0;
  3871.           T_SetPart(taglist);
  3872.           break;
  3873. ***************
  3874. *** 873,878 ****
  3875.   /* 
  3876.    * This routine sets up the interval timer we allocated with
  3877. !  * AddICRVector().  Note that we may have alreay received one, or
  3878. !  * more interrupts from our timer.  Make no assumptions about the
  3879.    * initial state of any of the hardware registers we will be using.
  3880.    *
  3881. --- 927,932 ----
  3882.   /* 
  3883.    * This routine sets up the interval timer we allocated with
  3884. !  * AddICRVector().    Note that we may have alreay received one, or
  3885. !  * more interrupts from our timer.    Make no assumptions about the
  3886.    * initial state of any of the hardware registers we will be using.
  3887.    *
  3888. ***************
  3889. *** 886,937 ****
  3890.       {
  3891.           case SAMPLER_PERFECT:
  3892. !              pciaa->ciaddrb  = 0xC0;    /* high two bits are output/control bits on the PerfectSound! */
  3893. !              pciaa->ciaprb  |= 0xC0;    /* PB6, PB7 both high when sampling? */
  3894. !              SetDirectionBits(SAMPBIT_BUSYCLR);    /* per generic.source? */
  3895. !              break;
  3896. !                      
  3897. !         case SAMPLER_TOCCATA: case SAMPLER_AHI: case SAMPLER_DELFINA:
  3898. !              /* Don't call StartTimer() with these sampler types, fruit loop! */
  3899. !              return(FALSE);
  3900. !              break;
  3901.           
  3902.           case SAMPLER_SOMAGIC:
  3903. !              pciaa->ciaddrb  = 0x00;    /* all bits: input mode */
  3904. !              /* for this model, BUSY is used as an output also */
  3905. !              SetDirectionBits(SAMPBIT_SELSET | SAMPBIT_POUTSET | SAMPBIT_BUSYSET);
  3906. !              break; 
  3907.           
  3908.           case SAMPLER_CUSTOM:
  3909. !              /* Make all data bits input */
  3910. !              pciaa->ciaddrb  = 0x00;
  3911. !              /* User-customizable set of control direction bits */
  3912. !              SetDirectionBits(ubCustDir);
  3913. !              /* User-customizable set of control data bits */
  3914. !              SetParallelBits(EVENT_START, ubCustStart);
  3915. !              break;
  3916. !          
  3917.           default:
  3918. !              pciaa->ciaddrb  = 0x00;    /* all bits: input mode */
  3919. !              SetDirectionBits(SAMPBIT_SELSET | SAMPBIT_POUTSET | SAMPBIT_BUSYCLR);
  3920. !              break;
  3921.       }
  3922.   
  3923.       UNLESS(AllocSamplingBuffer(ulSmallestArraySize)) return(FALSE);
  3924.       
  3925. !     IntData.pubSampleAt   = AMIGA_HARDWARE_SAMPLE_ADDRESS;        /* default = parallel hardware */
  3926. !     IntData.stTask        = FindTask(NULL);
  3927.       IntData.ulHalfSignal  = (1<<sighalf);
  3928.       IntData.ulFullSignal  = (1<<sigfull);
  3929. !     IntData.ulShiftLeft   = (ULONG) nAmpShift;
  3930. !     IntData.ulByteSum     = 0L;
  3931.       IntData.ulSaveByteSum = 0L;
  3932.       IntData.ulThreshhold  = (nPreSendQLen == 0) ? ((ULONG) ((nMinSampleVol*255)/100)) : 0L;
  3933. !     IntData.uwCiavals     = uwMicros;
  3934. !     IntData.uwClearCode   = (ft->BUsingCIAB) ? INTF_EXTER : INTF_PORTS;
  3935. !     IntData.BIdle          = 1L;
  3936.       
  3937. !     ChangeInputChannel(ubInputChannel);    /* select channel for input if possible */
  3938.   
  3939. !     ulLastVolume = SILENCE;    
  3940.       TransmitData(0,0,0);
  3941.           
  3942. --- 940,992 ----
  3943.       {
  3944.           case SAMPLER_PERFECT:
  3945. !              pciaa->ciaddrb     = 0xC0;    /* high two bits are output/control bits on the PerfectSound! */
  3946. !              pciaa->ciaprb    |= 0xC0;    /* PB6, PB7 both high when sampling? */
  3947. !              SetDirectionBits(SAMPBIT_BUSYCLR); /* per generic.source? */
  3948. !              break;
  3949. !                      
  3950. !         case SAMPLER_TOCCATA:
  3951. !         case SAMPLER_AHI:
  3952. !              /* Don't call StartTimer() with these sampler types, fruit loop! */
  3953. !              return(FALSE);
  3954. !              break;
  3955.           
  3956.           case SAMPLER_SOMAGIC:
  3957. !              pciaa->ciaddrb     = 0x00;    /* all bits: input mode */
  3958. !              /* for this model, BUSY is used as an output also */
  3959. !              SetDirectionBits(SAMPBIT_SELSET | SAMPBIT_POUTSET | SAMPBIT_BUSYSET);
  3960. !              break; 
  3961.           
  3962.           case SAMPLER_CUSTOM:
  3963. !              /* Make all data bits input */
  3964. !              pciaa->ciaddrb     = 0x00;
  3965. !              /* User-customizable set of control direction bits */
  3966. !              SetDirectionBits(ubCustDir);
  3967. !              /* User-customizable set of control data bits */
  3968. !              SetParallelBits(EVENT_START, ubCustStart);
  3969. !              break;
  3970. !         
  3971.           default:
  3972. !              pciaa->ciaddrb     = 0x00;    /* all bits: input mode */
  3973. !              SetDirectionBits(SAMPBIT_SELSET | SAMPBIT_POUTSET | SAMPBIT_BUSYCLR);
  3974. !              break;
  3975.       }
  3976.   
  3977.       UNLESS(AllocSamplingBuffer(ulSmallestArraySize)) return(FALSE);
  3978.       
  3979. !     IntData.pubSampleAt      = AMIGA_HARDWARE_SAMPLE_ADDRESS;        /* default = parallel hardware */
  3980. !     IntData.stTask          = FindTask(NULL);
  3981.       IntData.ulHalfSignal  = (1<<sighalf);
  3982.       IntData.ulFullSignal  = (1<<sigfull);
  3983. !     IntData.ulShiftLeft      = (ULONG) nAmpShift;
  3984. !     IntData.ulByteSum      = 0L;
  3985.       IntData.ulSaveByteSum = 0L;
  3986.       IntData.ulThreshhold  = (nPreSendQLen == 0) ? ((ULONG) ((nMinSampleVol*255)/100)) : 0L;
  3987. !     IntData.uwCiavals      = uwMicros;
  3988. !     IntData.uwClearCode      = (ft->BUsingCIAB) ? INTF_EXTER : INTF_PORTS;
  3989. !     IntData.BIdle          = 1L;
  3990.       
  3991. !     ChangeInputChannel(ubInputChannel); /* select channel for input if possible */
  3992.   
  3993. !     ulLastVolume = SILENCE; 
  3994.       TransmitData(0,0,0);
  3995.           
  3996. ***************
  3997. *** 962,972 ****
  3998.       }
  3999.   
  4000. !     IntData.pubCiahi      = ft->ciahi;
  4001. !     IntData.pubCialo      = ft->cialo;
  4002.           
  4003.       /* Modify control register within Disable().  This is done to avoid
  4004.        * race conditions since our compiler may generate code such as:
  4005.        *
  4006. !      *     value = Read hardware byte
  4007.        *    AND value with MASK
  4008.        *    Write value to hardware byte
  4009. --- 1017,1027 ----
  4010.       }
  4011.   
  4012. !     IntData.pubCiahi      = ft->ciahi;
  4013. !     IntData.pubCialo      = ft->cialo;
  4014.           
  4015.       /* Modify control register within Disable().  This is done to avoid
  4016.        * race conditions since our compiler may generate code such as:
  4017.        *
  4018. !      *    value = Read hardware byte
  4019.        *    AND value with MASK
  4020.        *    Write value to hardware byte
  4021. ***************
  4022. *** 1036,1050 ****
  4023.       /* Initialize arg struct for inthandler */
  4024.       Disable();
  4025. !     IntData.pubIndex      = pubAllocedArray;
  4026. !     IntData.pubArray      = pubAllocedArray;
  4027.       if (pubAllocedArray)
  4028.       {
  4029.           IntData.pubHalfIndex  = &pubAllocedArray[ulAllocedArraySize/2];
  4030. !         IntData.pubEndIndex   = &pubAllocedArray[ulAllocedArraySize-1];
  4031.       }
  4032.       else
  4033.       {
  4034.           IntData.pubHalfIndex  = NULL;
  4035. !         IntData.pubEndIndex   = NULL;
  4036.       }
  4037.       Enable();
  4038. --- 1091,1105 ----
  4039.       /* Initialize arg struct for inthandler */
  4040.       Disable();
  4041. !     IntData.pubIndex      = pubAllocedArray;
  4042. !     IntData.pubArray      = pubAllocedArray;
  4043.       if (pubAllocedArray)
  4044.       {
  4045.           IntData.pubHalfIndex  = &pubAllocedArray[ulAllocedArraySize/2];
  4046. !         IntData.pubEndIndex      = &pubAllocedArray[ulAllocedArraySize-1];
  4047.       }
  4048.       else
  4049.       {
  4050.           IntData.pubHalfIndex  = NULL;
  4051. !         IntData.pubEndIndex      = NULL;
  4052.       }
  4053.       Enable();
  4054. ***************
  4055. *** 1073,1077 ****
  4056.       Disable();
  4057.       *ft->ciahi = ((uwMicros & 0xFF00)>>8);
  4058. !     *ft->cialo =  (uwMicros & 0x00FF)    ;
  4059.       Enable();
  4060.   }
  4061. --- 1128,1132 ----
  4062.       Disable();
  4063.       *ft->ciahi = ((uwMicros & 0xFF00)>>8);
  4064. !     *ft->cialo =  (uwMicros & 0x00FF)     ;
  4065.       Enable();
  4066.   }
  4067. ***************
  4068. *** 1083,1087 ****
  4069.    *
  4070.    * This routine makes no assumptions about which interval timers
  4071. !  * (if any) are available for use.  Currently there are two interval
  4072.    * timers per CIA chip.
  4073.    *
  4074. --- 1138,1142 ----
  4075.    *
  4076.    * This routine makes no assumptions about which interval timers
  4077. !  * (if any) are available for use.    Currently there are two interval
  4078.    * timers per CIA chip.
  4079.    *
  4080. ***************
  4081. *** 1105,1109 ****
  4082.       /* Try for CIA-A */
  4083.       ft->ciabase = ciaabase;        /* library address for */
  4084. !     ft->cia    = pciaa;
  4085.       ft->BUsingCIAB = FALSE;
  4086.       if (TryTimer(ft)) return(TRUE);
  4087. --- 1160,1164 ----
  4088.       /* Try for CIA-A */
  4089.       ft->ciabase = ciaabase;        /* library address for */
  4090. !     ft->cia = pciaa;
  4091.       ft->BUsingCIAB = FALSE;
  4092.       if (TryTimer(ft)) return(TRUE);
  4093. ***************
  4094. *** 1111,1117 ****
  4095.       /* Couldn't get CIA-A, try for CIA-B */
  4096.       ft->ciabase = ciabbase;
  4097. !     ft->cia        = pciab;
  4098.       ft->BUsingCIAB = TRUE;
  4099. !      return(TryTimer(ft));
  4100.   }
  4101.   
  4102. --- 1166,1172 ----
  4103.       /* Couldn't get CIA-A, try for CIA-B */
  4104.       ft->ciabase = ciabbase;
  4105. !     ft->cia        = pciab;
  4106.       ft->BUsingCIAB = TRUE;
  4107. !     return(TryTimer(ft));
  4108.   }
  4109.   
  4110. ***************
  4111. *** 1141,1145 ****
  4112.   /* returns success, or if BAlloc == CHECK_STATUS, returns TRUE if
  4113.      available, FALSE if not */
  4114. ! /* Don't call this manually except to check_status!  StartSampling
  4115.      will call it as necessary! */
  4116.   BOOL AllocParallel(BOOL BAlloc, BOOL BGrab)
  4117. --- 1196,1200 ----
  4118.   /* returns success, or if BAlloc == CHECK_STATUS, returns TRUE if
  4119.      available, FALSE if not */
  4120. ! /* Don't call this manually except to check_status!     StartSampling
  4121.      will call it as necessary! */
  4122.   BOOL AllocParallel(BOOL BAlloc, BOOL BGrab)
  4123. ***************
  4124. *** 1159,1167 ****
  4125.               /* If another AmiPhone is using the parallel, we'll try to kick them off! */
  4126.               if ((BGrab == TRUE)&&(strncmp(szCurrentUser, "AmiPhone", 8) == 0)&&
  4127. !                 (TellOtherAmiPhoneToLetGo(szCurrentUser) == TRUE)) 
  4128. !                 {
  4129. !                     Delay(5);    /* allow the other guy time to disengage */
  4130. !                     return(AllocParallel(TRUE, FALSE));
  4131. !                 }
  4132.               
  4133.               sprintf(szMessage,"%s Parallel port in use.",pcErrType);
  4134. --- 1214,1222 ----
  4135.               /* If another AmiPhone is using the parallel, we'll try to kick them off! */
  4136.               if ((BGrab == TRUE)&&(strncmp(szCurrentUser, "AmiPhone", 8) == 0)&&
  4137. !                 (TellOtherAmiPhoneToLetGo(szCurrentUser) == TRUE)) 
  4138. !                 {
  4139. !                     Delay(5);    /* allow the other guy time to disengage */
  4140. !                     return(AllocParallel(TRUE, FALSE));
  4141. !                 }
  4142.               
  4143.               sprintf(szMessage,"%s Parallel port in use.",pcErrType);
  4144. ***************
  4145. *** 1182,1186 ****
  4146.       if ((BAlloc == FALSE)||(BAlloc == CHECK_STATUS))    
  4147.       {        
  4148. !         FreeMiscResource(MR_PARALLELBITS);         
  4149.           FreeMiscResource(MR_PARALLELPORT);
  4150.       }            
  4151. --- 1237,1241 ----
  4152.       if ((BAlloc == FALSE)||(BAlloc == CHECK_STATUS))    
  4153.       {        
  4154. !         FreeMiscResource(MR_PARALLELBITS);        
  4155.           FreeMiscResource(MR_PARALLELPORT);
  4156.       }            
  4157. ***************
  4158. *** 1215,1219 ****
  4159.       {
  4160.           if (sigfull != 0) {FreeSignal(sigfull);     sigfull = 0;}
  4161. !         if (sighalf != 0) {FreeSignal(sighalf);  sighalf = 0;}
  4162.       }    
  4163.       return(TRUE);    
  4164. --- 1270,1274 ----
  4165.       {
  4166.           if (sigfull != 0) {FreeSignal(sigfull);     sigfull = 0;}
  4167. !         if (sighalf != 0) {FreeSignal(sighalf);     sighalf = 0;}
  4168.       }    
  4169.       return(TRUE);    
  4170. ***************
  4171. *** 1240,1249 ****
  4172.       ulTemp >>= 2;
  4173.   
  4174. !     /* compression algorithm specific size restrictions implemented here */    
  4175.       switch(bComp)
  4176.       {
  4177.           case COMPRESS_ADPCM2: while (ulTemp % 2) ulTemp++; break;
  4178.           case COMPRESS_ADPCM3: while (ulTemp % 3) ulTemp++; break;
  4179. !         case COMPRESS_NONE:   while (ulTemp % 2) ulTemp++; break;
  4180.       }
  4181.       return(ulTemp);
  4182. --- 1295,1304 ----
  4183.       ulTemp >>= 2;
  4184.   
  4185. !     /* compression algorithm specific size restrictions implemented here */ 
  4186.       switch(bComp)
  4187.       {
  4188.           case COMPRESS_ADPCM2: while (ulTemp % 2) ulTemp++; break;
  4189.           case COMPRESS_ADPCM3: while (ulTemp % 3) ulTemp++; break;
  4190. !         case COMPRESS_NONE:      while (ulTemp % 2) ulTemp++; break;
  4191.       }
  4192.       return(ulTemp);
  4193. ***************
  4194. *** 1254,1260 ****
  4195.   {
  4196.       ubCurrComp = ubNewMode;
  4197. -     
  4198. -     /* Force reset! */
  4199. -     if (ubSamplerType == SAMPLER_DELFINA) ChangeSampleSpeed(ulBytesPerSecond, ubCurrComp);
  4200.   }
  4201.   
  4202. --- 1309,1312 ----
  4203. ***************
  4204. *** 1269,1283 ****
  4205.           if ((ulNewBPS == 0)||(ulNewBPS > nMaxSampleRate)) ulNewBPS = T_FindFrequency(0);
  4206.       }
  4207. !     if (ubSamplerType == SAMPLER_DELFINA) ulNewBPS = GetClosestDelfRate(ulNewBPS, NULL, NULL);
  4208. !     if ((ubSamplerType == SAMPLER_AHI)&&(ulAHIAudioMode)) ulNewBPS = AHI_FindFrequency(ulNewBPS);
  4209.   
  4210.       /* make sure our sampling isn't too fast or too slow */
  4211.       if (UsesCIAInterrupt())
  4212. !             ulNewBPS = ChopValue(ulNewBPS, MIN_SAMPLE_RATE, nMaxSampleRate);
  4213.   
  4214.       /* make sure our packets aren't too small  */
  4215.       if (fPacketDelay < MIN_PACKET_INTERVAL) fPacketDelay = MIN_PACKET_INTERVAL;
  4216.   
  4217. !     /* To keep a particular speed, add this:         */
  4218.       /* if (bComp == COMPRESS_SDP1) ulNewBPS = 6000L; */
  4219.   
  4220. --- 1321,1334 ----
  4221.           if ((ulNewBPS == 0)||(ulNewBPS > nMaxSampleRate)) ulNewBPS = T_FindFrequency(0);
  4222.       }
  4223. !     if ((ubSamplerType == SAMPLER_AHI)&&(ulAHIMode != AHI_INVALID_ID)) ulNewBPS = AHI_FindFrequency(ulNewBPS);
  4224.   
  4225.       /* make sure our sampling isn't too fast or too slow */
  4226.       if (UsesCIAInterrupt())
  4227. !             ulNewBPS = ChopValue(ulNewBPS, MIN_SAMPLE_RATE, nMaxSampleRate);
  4228.   
  4229.       /* make sure our packets aren't too small  */
  4230.       if (fPacketDelay < MIN_PACKET_INTERVAL) fPacketDelay = MIN_PACKET_INTERVAL;
  4231.   
  4232. !     /* To keep a particular speed, add this:         */
  4233.       /* if (bComp == COMPRESS_SDP1) ulNewBPS = 6000L; */
  4234.   
  4235. ***************
  4236. *** 1294,1298 ****
  4237.               
  4238.               Disable();
  4239. !             IntData.uwCiavals     = ulTimerDelay;
  4240.               IntData.ulThreshhold  = (ULONG) (nMinSampleVol*255)/100;
  4241.               UNLESS(IntData.BIdle) SetTimerCountdown(NULL,ulTimerDelay);
  4242. --- 1345,1349 ----
  4243.               
  4244.               Disable();
  4245. !             IntData.uwCiavals      = ulTimerDelay;
  4246.               IntData.ulThreshhold  = (ULONG) (nMinSampleVol*255)/100;
  4247.               UNLESS(IntData.BIdle) SetTimerCountdown(NULL,ulTimerDelay);
  4248. ***************
  4249. *** 1315,1319 ****
  4250.   /* Go through and make the bytes in the buffer unsigned,
  4251.      and add up their total and return it as well */
  4252. ! ULONG ProcessToccataBuffer(UBYTE * pubData, ULONG ulDataLen)
  4253.   {
  4254.       register ULONG ulSum = 0L;
  4255. --- 1366,1370 ----
  4256.   /* Go through and make the bytes in the buffer unsigned,
  4257.      and add up their total and return it as well */
  4258. ! static ULONG ProcessToccataBuffer(UBYTE * pubData, ULONG ulDataLen)
  4259.   {
  4260.       register ULONG ulSum = 0L;
  4261. ***************
  4262. *** 1332,1370 ****
  4263.   
  4264.   
  4265. ! /* Turn the words in the buffer into bytes.  Note that the
  4266. !    ulDataLen parameter is the length of the buffer in BYTES,
  4267. !    and when the function returns, only the first half of
  4268. !    the buffer will be valid. */
  4269.   /* Returns the sample sum, just like ProcessToccataBuffer() */
  4270.   
  4271. ! /* pubData    - pointer to the sampled buffer */
  4272. ! /* ulDataLen  - in/out variable, sends in length of buffer at current
  4273. !         bit-width, etc... returns out the length of buffer 
  4274. !         in 8-bit mono */
  4275. ! /* ulType     - The data type as given by AHI */
  4276. ! ULONG ProcessAHIBuffer(UBYTE * pubData, ULONG * ulDataLen, ULONG ulType)
  4277.   {
  4278.       register ULONG ulSum = 0L;
  4279. !     register UBYTE ubTemp, ubReadDiff;
  4280. !     register UBYTE * pubCurrentRead  = pubData;
  4281. !     register UBYTE * pubCurrentWrite = pubData;
  4282. !     register ULONG ulLeft;
  4283.       
  4284.       switch(ulType)
  4285.       {
  4286. -         case AHIST_M8S:   /* Mono, 8 bit signed (BYTE) */
  4287. -             ubReadDiff = 1;
  4288. -             break;
  4289. -                                 
  4290. -         case AHIST_M8U:   /* Mono, 8 bit unsigned (UBYTE) */
  4291. -             ubReadDiff = 1;
  4292. -             break;
  4293. -             
  4294. -         case AHIST_M16S:  /* Mono, 16 bit signed (WORD) */
  4295. -             ubReadDiff = 2;
  4296. -             break;
  4297. -             
  4298.           case AHIST_S16S:  /* Stereo 16 bit signed (2×WORD) */
  4299. -             ubReadDiff = 4;
  4300.               if (ubInputChannel == INPUT_JACK_RIGHT) pubCurrentRead += 2;
  4301.               break;
  4302. --- 1383,1404 ----
  4303.   
  4304.   
  4305. ! /* Turn the words in the buffer into bytes. */
  4306.   /* Returns the sample sum, just like ProcessToccataBuffer() */
  4307.   
  4308. ! /* pubSrc      - pointer to the sampled buffer */
  4309. ! /* pubDst      - pointer to the destination buffer */
  4310. ! /* ulDataLen  - length is samples */
  4311. ! /* ulType      - The data type as given by AHI */
  4312. ! static ULONG ProcessAHIBuffer(UBYTE * pubSrc, UBYTE * pubDst, ULONG ulDataLen, ULONG ulType)
  4313.   {
  4314.       register ULONG ulSum = 0L;
  4315. !     register UBYTE ubTemp = 0;
  4316. !     register UBYTE * pubCurrentRead     = pubSrc;
  4317. !     register UBYTE * pubCurrentWrite = pubDst;
  4318. !     register ULONG ulLeft = ulDataLen;
  4319.       
  4320.       switch(ulType)
  4321.       {
  4322.           case AHIST_S16S:  /* Stereo 16 bit signed (2×WORD) */
  4323.               if (ubInputChannel == INPUT_JACK_RIGHT) pubCurrentRead += 2;
  4324.               break;
  4325. ***************
  4326. *** 1375,1386 ****
  4327.       }
  4328.       
  4329. -     *ulDataLen = ulLeft = (*ulDataLen)/ubReadDiff;
  4330. -     
  4331.       while(ulLeft--)
  4332.       {
  4333. !         ubTemp = ((*pubCurrentRead)-128)<<nAmpShift;
  4334. !         ulSum += ubTemp;
  4335.           *pubCurrentWrite = ubTemp;
  4336. !         pubCurrentRead += ubReadDiff; pubCurrentWrite++;
  4337.       }
  4338.       return(ulSum);
  4339. --- 1409,1419 ----
  4340.       }
  4341.       
  4342.       while(ulLeft--)
  4343.       {
  4344. !         ubTemp = (*pubCurrentRead)<<nAmpShift;
  4345.           *pubCurrentWrite = ubTemp;
  4346. !         ulSum += ubTemp;
  4347. !         pubCurrentRead += 4;
  4348. !         pubCurrentWrite++;
  4349.       }
  4350.       return(ulSum);
  4351. ***************
  4352. *** 1400,1404 ****
  4353.       {
  4354.           ulMaxArrayCount = ulSampleArraySize << 6;
  4355. !         ulVolume >>= 4;    /* It's still a mystery to me why this is 16 times too big! */
  4356.       }
  4357.       else
  4358. --- 1433,1437 ----
  4359.       {
  4360.           ulMaxArrayCount = ulSampleArraySize << 6;
  4361. !         ulVolume >>= 4; /* It's still a mystery to me why this is 16 times too big! */
  4362.       }
  4363.       else
  4364. ***************
  4365. *** 1420,1424 ****
  4366.       {
  4367.           case SAMPLER_GVPDSS8:    ulVol <<= 1; break;
  4368. !         case SAMPLER_TOCCATA:   ulVol <<= 2; break;
  4369.       }
  4370.       
  4371. --- 1453,1457 ----
  4372.       {
  4373.           case SAMPLER_GVPDSS8:    ulVol <<= 1; break;
  4374. !         case SAMPLER_TOCCATA:    ulVol <<= 2; break;
  4375.       }
  4376.       
  4377. ***************
  4378. *** 1437,1441 ****
  4379.   
  4380.   /* If nBytes == ALL_OF_BUFFER, transmit the whole buffer section.
  4381. !    Otherwise, transmit the first nBytes of the indicated buffer. */   
  4382.   void TransmitData(UBYTE * pubStart, int nBytes, int bComp)
  4383.   {
  4384. --- 1470,1474 ----
  4385.   
  4386.   /* If nBytes == ALL_OF_BUFFER, transmit the whole buffer section.
  4387. !    Otherwise, transmit the first nBytes of the indicated buffer. */      
  4388.   void TransmitData(UBYTE * pubStart, int nBytes, int bComp)
  4389.   {
  4390. ***************
  4391. *** 1443,1447 ****
  4392.       BOOL BSoundWasOnBefore = BSoundOn;
  4393.       static ULONG ulSaveJoin = 0L, ulJoinCode = 0L;
  4394. !     static int nPostGracePeriod = nPostSendLen;
  4395.               
  4396.       if (nBytes == 0)
  4397. --- 1476,1482 ----
  4398.       BOOL BSoundWasOnBefore = BSoundOn;
  4399.       static ULONG ulSaveJoin = 0L, ulJoinCode = 0L;
  4400. !     static int nPostGracePeriod;
  4401. !   nPostGracePeriod = nPostSendLen;
  4402.               
  4403.       if (nBytes == 0)
  4404. ***************
  4405. *** 1454,1460 ****
  4406.   
  4407.       /* Was there enough sound there to transmit? */
  4408. !     if (ubSamplerType == SAMPLER_DELFINA)
  4409. !         ulLastVolume = IntData.ulSaveByteSum = DelfPacket(sendBuf.ubData, nBytes, &ulSaveJoin);
  4410. !        else ulLastVolume = IntData.ulSaveByteSum;
  4411.          
  4412.       if (CalcVolumePercentage(ulLastVolume) < nMinSampleVol)
  4413. --- 1489,1493 ----
  4414.   
  4415.       /* Was there enough sound there to transmit? */
  4416. !   ulLastVolume = IntData.ulSaveByteSum;
  4417.          
  4418.       if (CalcVolumePercentage(ulLastVolume) < nMinSampleVol)
  4419. ***************
  4420. *** 1462,1467 ****
  4421.           /* This section entered if the current buffer is too quiet */
  4422.           if (nPostGracePeriod > 0) 
  4423. !              nPostGracePeriod--; /* time is running out to hear something! */
  4424. !         else BSoundOn = FALSE;     /* time's up!  Shut off the transmission! */
  4425.       }
  4426.       else 
  4427. --- 1495,1500 ----
  4428.           /* This section entered if the current buffer is too quiet */
  4429.           if (nPostGracePeriod > 0) 
  4430. !              nPostGracePeriod--; /* time is running out to hear something! */
  4431. !         else BSoundOn = FALSE;     /* time's up!    Shut off the transmission! */
  4432.       }
  4433.       else 
  4434. ***************
  4435. *** 1488,1506 ****
  4436.           /* Prepare/compress the packet */
  4437.           sendBuf.header.ubCommand  = PHONECOMMAND_DATA;
  4438. !         sendBuf.header.ubType     = bComp;
  4439.           sendBuf.header.ulBPS      = ulBytesPerSecond;
  4440.           sendBuf.header.ulJoinCode = ulJoinCode;
  4441.   
  4442. !         if (ubSamplerType == SAMPLER_DELFINA)
  4443. !         {
  4444. !             /* Compression was done by the Delfina's DSP, 
  4445. !                all we need to do here is get the next ulJoinCode */
  4446. !             sendBuf.header.ulDataLen = nBytes;
  4447. !         }
  4448. !         else
  4449. !         {
  4450. !             /* Do the compression ourselves! */
  4451. !             sendBuf.header.ulDataLen  = CompressData(pubStart,sendBuf.ubData,bComp,ulLength,&ulJoinCode);
  4452. !         }    
  4453.       }
  4454.   
  4455. --- 1521,1529 ----
  4456.           /* Prepare/compress the packet */
  4457.           sendBuf.header.ubCommand  = PHONECOMMAND_DATA;
  4458. !         sendBuf.header.ubType      = bComp;
  4459.           sendBuf.header.ulBPS      = ulBytesPerSecond;
  4460.           sendBuf.header.ulJoinCode = ulJoinCode;
  4461.   
  4462. !         sendBuf.header.ulDataLen  = CompressData(pubStart,sendBuf.ubData,bComp,ulLength,&ulJoinCode);
  4463.       }
  4464.   
  4465. ***************
  4466. *** 1519,1525 ****
  4467.       }    
  4468.   
  4469. -     /* For Delfina:  *Now* update ulJoinCode, AFTER we've set sendBuf.header.ulJoinCode */
  4470. -     if (ubSamplerType == SAMPLER_DELFINA) ulJoinCode = ulSaveJoin;
  4471.       /* If we're doing hold-to-transmit and button is no longer being held, turn sampler off */
  4472.       if ((nToggleMode == TOGGLE_HOLD)&&(BButtonHeld == FALSE)) ToggleMicButton(CODE_OFF);
  4473. --- 1542,1545 ----
  4474. ***************
  4475. *** 1556,1560 ****
  4476.   
  4477.   /* Empty the presend queue, either with or without transmitting packets */
  4478. ! void FlushPreSendQueue(BOOL BTransmit, BOOL BTCP)
  4479.   {    
  4480.       struct Node * current;
  4481. --- 1576,1580 ----
  4482.   
  4483.   /* Empty the presend queue, either with or without transmitting packets */
  4484. ! static void FlushPreSendQueue(BOOL BTransmit, BOOL BTCP)
  4485.   {    
  4486.       struct Node * current;
  4487. ***************
  4488. *** 1567,1571 ****
  4489.   }
  4490.   
  4491. ! void FreePreSendNode(struct Node * current)
  4492.   {
  4493.       struct AmiPhoneSendBuffer * packet = current->ln_Name;
  4494. --- 1587,1591 ----
  4495.   }
  4496.   
  4497. ! static void FreePreSendNode(struct Node * current)
  4498.   {
  4499.       struct AmiPhoneSendBuffer * packet = current->ln_Name;
  4500. ***************
  4501. *** 1576,1580 ****
  4502.   }
  4503.   
  4504. ! void UpdatePreSendQueue(struct AmiPhoneSendBuffer * sBuf)
  4505.   {
  4506.       struct AmiPhoneSendBuffer * newPacket;
  4507. --- 1596,1600 ----
  4508.   }
  4509.   
  4510. ! static void UpdatePreSendQueue(struct AmiPhoneSendBuffer * sBuf)
  4511.   {
  4512.       struct AmiPhoneSendBuffer * newPacket;
  4513. ***************
  4514. *** 1631,1636 ****
  4515.       if (ubBitCode & SAMPBIT_POUTSET) SETCIA(CIAF_PRTRPOUT);
  4516.       
  4517. !     if (ubBitCode & SAMPBIT_SELCLR)  CLRCIA(CIAF_PRTRSEL);
  4518. !     if (ubBitCode & SAMPBIT_SELSET)  SETCIA(CIAF_PRTRSEL);
  4519.       
  4520.       if (ubBitCode & SAMPBIT_BUSYCLR) CLRCIA(CIAF_PRTRBUSY);
  4521. --- 1651,1656 ----
  4522.       if (ubBitCode & SAMPBIT_POUTSET) SETCIA(CIAF_PRTRPOUT);
  4523.       
  4524. !     if (ubBitCode & SAMPBIT_SELCLR)     CLRCIA(CIAF_PRTRSEL);
  4525. !     if (ubBitCode & SAMPBIT_SELSET)     SETCIA(CIAF_PRTRSEL);
  4526.       
  4527.       if (ubBitCode & SAMPBIT_BUSYCLR) CLRCIA(CIAF_PRTRBUSY);
  4528. ***************
  4529. *** 1651,1656 ****
  4530.       if (ubBitCode & SAMPBIT_POUTSET) SETDCIA(CIAF_PRTRPOUT);
  4531.       
  4532. !     if (ubBitCode & SAMPBIT_SELCLR)  CLRDCIA(CIAF_PRTRSEL);
  4533. !     if (ubBitCode & SAMPBIT_SELSET)  SETDCIA(CIAF_PRTRSEL);
  4534.       
  4535.       if (ubBitCode & SAMPBIT_BUSYCLR) CLRDCIA(CIAF_PRTRBUSY);
  4536. --- 1671,1676 ----
  4537.       if (ubBitCode & SAMPBIT_POUTSET) SETDCIA(CIAF_PRTRPOUT);
  4538.       
  4539. !     if (ubBitCode & SAMPBIT_SELCLR)     CLRDCIA(CIAF_PRTRSEL);
  4540. !     if (ubBitCode & SAMPBIT_SELSET)     SETDCIA(CIAF_PRTRSEL);
  4541.       
  4542.       if (ubBitCode & SAMPBIT_BUSYCLR) CLRDCIA(CIAF_PRTRBUSY);
  4543. ***************
  4544. *** 1658,1662 ****
  4545.   
  4546.       if ((ubSamplerType == SAMPLER_CUSTOM)&&
  4547. !         (ubBitCode != (SAMPBIT_POUTSET | SAMPBIT_SELSET | SAMPBIT_BUSYSET))) printf("SetDirectionBits:  Executed %s, direction bits are now %s\n",BitsToString(ubBitCode),RegToString(pciab->ciaddra));
  4548.   }
  4549.   
  4550. --- 1678,1682 ----
  4551.   
  4552.       if ((ubSamplerType == SAMPLER_CUSTOM)&&
  4553. !         (ubBitCode != (SAMPBIT_POUTSET | SAMPBIT_SELSET | SAMPBIT_BUSYSET))) printf("SetDirectionBits:    Executed %s, direction bits are now %s\n",BitsToString(ubBitCode),RegToString(pciab->ciaddra));
  4554.   }
  4555.   
  4556. ***************
  4557. *** 1684,1688 ****
  4558.           (ubReg & CIAF_PRTRPOUT) != 0,
  4559.           (ubReg & CIAF_PRTRBUSY) != 0,
  4560. !         (ubReg & CIAF_PRTRSEL)  != 0);
  4561.       
  4562.       return(szResult);
  4563. --- 1704,1708 ----
  4564.           (ubReg & CIAF_PRTRPOUT) != 0,
  4565.           (ubReg & CIAF_PRTRBUSY) != 0,
  4566. !         (ubReg & CIAF_PRTRSEL)    != 0);
  4567.       
  4568.       return(szResult);
  4569. ***************
  4570. *** 1696,1710 ****
  4571.       struct TagItem taglist[3];
  4572.   
  4573. !     taglist[0].ti_Tag  = AHIDB_Index;     taglist[0].ti_Data  = &ulIndex;
  4574. !     taglist[1].ti_Tag  = AHIDB_IndexArg;     taglist[1].ti_Data  = ulBPS;
  4575. !     taglist[2].ti_Tag  = TAG_DONE;        taglist[2].ti_Data  = NULL;
  4576. !     if (AHI_GetAudioAttrsA(ulAHIAudioMode, NULL, taglist))
  4577. !     {
  4578. !         printf("AHI_FindFrequency: Nearest index = %lu\n",ulIndex);
  4579. !         taglist[0].ti_Tag  = AHIDB_Frequency;     taglist[0].ti_Data  = &ulFreq;
  4580. !         taglist[1].ti_Tag  = AHIDB_FrequencyArg;taglist[1].ti_Data  = ulIndex;
  4581. !         if (AHI_GetAudioAttrsA(ulAHIAudioMode, NULL, taglist))
  4582.           {
  4583. !             printf("AHI_FindFrequency: Frequency to use:  %lu\n",ulFreq);
  4584.               return(ulFreq);
  4585.           }
  4586. --- 1716,1730 ----
  4587.       struct TagItem taglist[3];
  4588.   
  4589. !     taglist[0].ti_Tag  = AHIDB_Index;    taglist[0].ti_Data    = &ulIndex;
  4590. !     taglist[1].ti_Tag  = AHIDB_IndexArg;    taglist[1].ti_Data    = ulBPS;
  4591. !     taglist[2].ti_Tag  = TAG_DONE;        taglist[2].ti_Data    = NULL;
  4592. !     if (AHI_GetAudioAttrsA(ulAHIMode, NULL, taglist))
  4593. !     {
  4594. ! //        printf("AHI_FindFrequency: Nearest index = %lu\n",ulIndex);
  4595. !         taglist[0].ti_Tag  = AHIDB_Frequency;    taglist[0].ti_Data    = &ulFreq;
  4596. !         taglist[1].ti_Tag  = AHIDB_FrequencyArg;taglist[1].ti_Data    = ulIndex;
  4597. !         if (AHI_GetAudioAttrsA(ulAHIMode, NULL, taglist))
  4598.           {
  4599. ! //            printf("AHI_FindFrequency: Frequency to use:  %lu\n",ulFreq);
  4600.               return(ulFreq);
  4601.           }
  4602. Only in ../AmiPhone_1.92: ciatimer.c.info
  4603. diff -r -C 2 -P ../AmiPhone_1.92/ciatimer.h ./ciatimer.h
  4604. *** ../AmiPhone_1.92/ciatimer.h    Sat Nov 16 23:46:40 1996
  4605. --- ./ciatimer.h    Mon Feb 16 23:09:58 1998
  4606. ***************
  4607. *** 44,53 ****
  4608.   BOOL SetupPreSendQueue(BOOL BSetup);
  4609.   
  4610. - ULONG ProcessToccataBuffer(UBYTE * pubData, ULONG ulDataLen);
  4611. - ULONG ProcessAHIBuffer(UBYTE * pubData, ULONG * ulDataLen, ULONG ulType);
  4612.   void TransmitData(UBYTE * pubStart, int ulLength, int bTransmitMode);
  4613.   void ChangeInputChannel(int nNewChannel);
  4614.   void ChangeSamplerType(int nNewSamplerType);
  4615.   void ChangeInputSource(int nNewSource, BOOL BMakePermanent);
  4616.   void ChangeCompressMode(UBYTE ubNewMode);
  4617. --- 44,51 ----
  4618.   BOOL SetupPreSendQueue(BOOL BSetup);
  4619.   
  4620.   void TransmitData(UBYTE * pubStart, int ulLength, int bTransmitMode);
  4621.   void ChangeInputChannel(int nNewChannel);
  4622.   void ChangeSamplerType(int nNewSamplerType);
  4623. + void ChangeAHIMode(void);
  4624.   void ChangeInputSource(int nNewSource, BOOL BMakePermanent);
  4625.   void ChangeCompressMode(UBYTE ubNewMode);
  4626. diff -r -C 2 -P ../AmiPhone_1.92/codec.c ./codec.c
  4627. *** ../AmiPhone_1.92/codec.c    Sat Nov 16 23:46:38 1996
  4628. --- ./codec.c    Sun Feb 15 23:04:26 1998
  4629. ***************
  4630. *** 1,8 ****
  4631. --- 1,10 ----
  4632.   #ifndef CODEC_C
  4633.   #define CODEC_C
  4634. + /* :ts=4 */
  4635.   
  4636.   /* codec.c : routines shared by AmiPhone AND AmiPhoned--govern audio
  4637.               compression, decompression, and playing */
  4638.   
  4639. + #include <netinclude:sys/types.h>
  4640.   #include <stdio.h>
  4641.   #include <string.h>
  4642. ***************
  4643. *** 224,228 ****
  4644.       }
  4645.       return(TRUE);
  4646. ! };
  4647.   
  4648.   
  4649. --- 226,230 ----
  4650.       }
  4651.       return(TRUE);
  4652. ! }
  4653.   
  4654.   
  4655. Only in ../AmiPhone_1.92: codec.c.info
  4656. diff -r -C 2 -P ../AmiPhone_1.92/compress/ADPCM2_Crunch.a ./compress/ADPCM2_Crunch.a
  4657. *** ../AmiPhone_1.92/compress/ADPCM2_Crunch.a    Sat Nov 16 23:46:46 1996
  4658. --- ./compress/ADPCM2_Crunch.a    Sun Feb 15 18:40:33 1998
  4659. ***************
  4660. *** 20,25 ****
  4661.   
  4662.   
  4663. !         XDEF @CompressADPCM2
  4664. ! @CompressADPCM2
  4665.           movem.l    d2-d4,-(sp)
  4666.   
  4667. --- 20,25 ----
  4668.   
  4669.   
  4670. !         XDEF _CompressADPCM2
  4671. ! _CompressADPCM2
  4672.           movem.l    d2-d4,-(sp)
  4673.   
  4674. diff -r -C 2 -P ../AmiPhone_1.92/compress/ADPCM2_Decrunch.a ./compress/ADPCM2_Decrunch.a
  4675. *** ../AmiPhone_1.92/compress/ADPCM2_Decrunch.a    Sat Nov 16 23:46:46 1996
  4676. --- ./compress/ADPCM2_Decrunch.a    Sun Feb 15 18:40:29 1998
  4677. ***************
  4678. *** 26,31 ****
  4679.       ;
  4680.   
  4681. !         XDEF @DecompressADPCM2
  4682. ! @DecompressADPCM2
  4683.           movem.l    d2-d4,-(sp)
  4684.   
  4685. --- 26,31 ----
  4686.       ;
  4687.   
  4688. !         XDEF _DecompressADPCM2
  4689. ! _DecompressADPCM2
  4690.           movem.l    d2-d4,-(sp)
  4691.   
  4692. diff -r -C 2 -P ../AmiPhone_1.92/compress/ADPCM3_Crunch.a ./compress/ADPCM3_Crunch.a
  4693. *** ../AmiPhone_1.92/compress/ADPCM3_Crunch.a    Sat Nov 16 23:46:46 1996
  4694. --- ./compress/ADPCM3_Crunch.a    Sun Feb 15 18:40:26 1998
  4695. ***************
  4696. *** 18,23 ****
  4697.       ; Function of the JoinCode: See above.
  4698.   
  4699. !         XDEF @CompressADPCM3
  4700. ! @CompressADPCM3
  4701.           movem.l    d2-d4,-(sp)
  4702.   
  4703. --- 18,23 ----
  4704.       ; Function of the JoinCode: See above.
  4705.   
  4706. !         XDEF _CompressADPCM3
  4707. ! _CompressADPCM3
  4708.           movem.l    d2-d4,-(sp)
  4709.   
  4710. diff -r -C 2 -P ../AmiPhone_1.92/compress/ADPCM3_Decrunch.a ./compress/ADPCM3_Decrunch.a
  4711. *** ../AmiPhone_1.92/compress/ADPCM3_Decrunch.a    Sat Nov 16 23:46:46 1996
  4712. --- ./compress/ADPCM3_Decrunch.a    Sun Feb 15 18:40:23 1998
  4713. ***************
  4714. *** 28,33 ****
  4715.       ;
  4716.   
  4717. !         XDEF @DecompressADPCM3
  4718. ! @DecompressADPCM3
  4719.           movem.l    d2-d4,-(sp)
  4720.   
  4721. --- 28,33 ----
  4722.       ;
  4723.   
  4724. !         XDEF _DecompressADPCM3
  4725. ! _DecompressADPCM3
  4726.           movem.l    d2-d4,-(sp)
  4727.   
  4728. Only in ../AmiPhone_1.92: delfph.c
  4729. Only in ../AmiPhone_1.92: delfph.c.info
  4730. Only in ../AmiPhone_1.92: delfph.h
  4731. Only in ../AmiPhone_1.92: delfphone.c
  4732. diff -r -C 2 -P ../AmiPhone_1.92/dmakefile ./dmakefile
  4733. *** ../AmiPhone_1.92/dmakefile    Sat Nov 16 23:46:48 1996
  4734. --- ./dmakefile    Sun Feb 15 12:47:03 1998
  4735. ***************
  4736. *** 1,4 ****
  4737.   SCC = dcc -proto
  4738. ! ASM = phxass I=include:amiga SD SC
  4739.   
  4740.   ASM_OBJS  = inthandler.o compress/ADPCM2_Crunch.o compress/ADPCM3_Crunch.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o
  4741. --- 1,4 ----
  4742.   SCC = dcc -proto
  4743. ! ASM = phxass SD SC
  4744.   
  4745.   ASM_OBJS  = inthandler.o compress/ADPCM2_Crunch.o compress/ADPCM3_Crunch.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o
  4746. Only in ../AmiPhone_1.92: dmakefile.info
  4747. diff -r -C 2 -P ../AmiPhone_1.92/gst.c ./gst.c
  4748. *** ../AmiPhone_1.92/gst.c    Thu Jan  1 01:00:00 1970
  4749. --- ./gst.c    Mon Feb 16 23:29:06 1998
  4750. ***************
  4751. *** 0 ****
  4752. --- 1,351 ----
  4753. + #include <stdio.h>
  4754. + #include <stdlib.h> 
  4755. + #include <string.h>
  4756. + #include <time.h>
  4757. + #include <devices/timer.h>
  4758. + #include <devices/ahi.h>
  4759. + #include <dos/dos.h>
  4760. + #include <dos/dostags.h>
  4761. + #include <dos/dosextens.h>
  4762. + #include <intuition/intuition.h>
  4763. + #include <intuition/intuitionbase.h>
  4764. + #include <intuition/gadgetclass.h>
  4765. + #include <intuition/screens.h>
  4766. + #include <libraries/gadtools.h>
  4767. + #include <exec/ports.h>
  4768. + #include <exec/memory.h>
  4769. + #include <exec/types.h>
  4770. + #include <exec/tasks.h>
  4771. + #include <exec/io.h>
  4772. + #include <exec/libraries.h>
  4773. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  4774. + #include <graphics/gfxbase.h>
  4775. + #include <libraries/gadtools.h>
  4776. + #include <sys/types.h>
  4777. + #include <workbench/workbench.h>
  4778. + #include <workbench/startup.h>
  4779. + #include <resources/misc.h>
  4780. + #include <graphics/text.h>
  4781. + #include <errno.h>
  4782. + #include <inetd.h>
  4783. + #include <sys/errno.h>
  4784. + #include <clib/alib_protos.h>
  4785. + #include <clib/dos_protos.h>
  4786. + #include <clib/exec_protos.h>
  4787. + #include <clib/intuition_protos.h>
  4788. + #include <clib/graphics_protos.h>
  4789. + #include <clib/gadtools_protos.h>
  4790. + #include <clib/wb_protos.h>
  4791. + #include <clib/icon_protos.h>
  4792. + #include <clib/diskfont_protos.h>
  4793. + #include <clib/iffparse_protos.h>
  4794. + #include <pragmas/ahi_pragmas.h>
  4795. + #include <libraries/toccata.h>
  4796. + #include <clib/toccata_protos.h>
  4797. + #include <pragmas/toccata_pragmas.h>
  4798. + #include <netinclude:sys/types.h>
  4799. + #include <stdio.h>
  4800. + #include <stdlib.h>
  4801. + #include <string.h>
  4802. + #include <time.h>
  4803. + #include <exec/types.h>
  4804. + #include <exec/io.h>
  4805. + #include <exec/lists.h>
  4806. + #include <exec/memory.h>
  4807. + #include <devices/audio.h>
  4808. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  4809. + #include <dos/dos.h>
  4810. + #include <dos/dosextens.h>
  4811. + #include <dos/dostags.h>
  4812. + #include <dos/var.h>
  4813. + #include <dos/exall.h>
  4814. + #include <graphics/gfxbase.h>        /* to determine if we are on a PAL or NTSC Amiga */
  4815. + #include <intuition/intuition.h>
  4816. + #include <libraries/gadtools.h>
  4817. + #include <clib/exec_protos.h>
  4818. + #include <clib/alib_protos.h>
  4819. + #include <clib/dos_protos.h>
  4820. + #include <clib/intuition_protos.h>
  4821. + #include <clib/icon_protos.h>
  4822. + #include <clib/gadtools_protos.h>
  4823. + #include <clib/graphics_protos.h>
  4824. + #include <errno.h>
  4825. + #include <inetd.h>
  4826. + #include <sys/types.h>
  4827. + #include <proto/socket.h>
  4828. + #include <sys/errno.h>
  4829. + #include <sys/types.h>
  4830. + #include <sys/socket.h>
  4831. + #include <sys/ioctl.h>
  4832. + #include <sys/syslog.h>
  4833. + #include <netdb.h>
  4834. + #include <pragmas/socket_pragmas.h>
  4835. + #include <inetd.h>
  4836. + #include <stdio.h>
  4837. + #include <string.h>
  4838. + #include <time.h>
  4839. + #include <clib/asl_protos.h>
  4840. + #include <clib/intuition_protos.h>
  4841. + #include <libraries/asl.h>
  4842. + #include <netinclude:sys/types.h>
  4843. + #include <stdio.h>
  4844. + #include <stdio.h>
  4845. + #include <stdlib.h> 
  4846. + #include <string.h>
  4847. + #include <time.h>
  4848. + #include <dos/dos.h>
  4849. + #include <dos/dostags.h>
  4850. + #include <dos/dosextens.h>
  4851. + #include <dos/var.h>
  4852. + #include <dos/exall.h>
  4853. + #include <intuition/intuition.h>
  4854. + #include <intuition/intuitionbase.h>
  4855. + #include <intuition/gadgetclass.h>
  4856. + #include <intuition/screens.h>
  4857. + #include <libraries/gadtools.h>
  4858. + #include <exec/ports.h>
  4859. + #include <exec/memory.h>
  4860. + #include <exec/types.h>
  4861. + #include <exec/tasks.h>
  4862. + #include <exec/io.h>
  4863. + #include <exec/libraries.h>
  4864. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  4865. + #include <libraries/gadtools.h>
  4866. + #include <clib/alib_protos.h>
  4867. + #include <clib/dos_protos.h>
  4868. + #include <clib/exec_protos.h>
  4869. + #include <clib/intuition_protos.h>
  4870. + #include <clib/graphics_protos.h>
  4871. + #include <clib/gadtools_protos.h>
  4872. + #include <clib/diskfont_protos.h>
  4873. + #include <time.h>
  4874. + #include <stdlib.h>
  4875. + #include <stdio.h>
  4876. + #include <string.h>
  4877. + #include <math.h>
  4878. + #include <exec/io.h>
  4879. + #include <exec/types.h>
  4880. + #include <exec/memory.h>
  4881. + #include <exec/tasks.h>
  4882. + #include <exec/interrupts.h>
  4883. + #include <exec/ports.h>
  4884. + #include <exec/lists.h>
  4885. + #include <hardware/cia.h>
  4886. + #include <hardware/intbits.h>
  4887. + #include <libraries/mathieeesp.h>
  4888. + #include <clib/mathieeedoubbas_protos.h>
  4889. + #include <resources/cia.h>
  4890. + #include <libraries/dos.h>
  4891. + #include <resources/misc.h>
  4892. + #include <utility/tagitem.h>
  4893. + #include <pragmas/ahi_pragmas.h>
  4894. + #include <devices/ahi.h>
  4895. + #include <clib/alib_protos.h>
  4896. + #include <clib/ahi_protos.h>
  4897. + #include <clib/dos_protos.h>
  4898. + #include <clib/cia_protos.h>
  4899. + #include <clib/exec_protos.h>
  4900. + #include <clib/misc_protos.h>
  4901. + #include <libraries/toccata.h>
  4902. + #include <clib/toccata_protos.h>
  4903. + #include <pragmas/toccata_pragmas.h>
  4904. + #include <netinclude:sys/types.h>
  4905. + #include <stdio.h>
  4906. + #include <string.h>
  4907. + #include <stdlib.h>
  4908. + #include <time.h>
  4909. + #include <exec/types.h>
  4910. + #include <exec/memory.h>
  4911. + #include <exec/ports.h>
  4912. + #include <devices/audio.h>
  4913. + #include <libraries/dos.h>        /* contains RETURN_OK, RETURN_WARN #def's */
  4914. + #include <graphics/gfxbase.h>        /* to determine if we are on a PAL or NTSC Amiga */
  4915. + #include <clib/intuition_protos.h>
  4916. + #include <clib/alib_protos.h>
  4917. + #include <clib/exec_protos.h>
  4918. + #include <clib/dos_protos.h>
  4919. + #include <clib/socket_protos.h>
  4920. + #include <pragmas/socket_pragmas.h>
  4921. + #include <stdio.h>
  4922. + #include <exec/types.h>
  4923. + #include <hardware/cia.h>
  4924. + #include <netinclude:sys/types.h>
  4925. + #include <stdio.h>
  4926. + #include <stdlib.h> 
  4927. + #include <string.h>
  4928. + #include <dos/dos.h>
  4929. + #include <dos/dostags.h>
  4930. + #include <devices/audio.h>
  4931. + #include <intuition/intuition.h>
  4932. + #include <intuition/intuitionbase.h>
  4933. + #include <intuition/gadgetclass.h>
  4934. + #include <intuition/screens.h>
  4935. + #include <libraries/gadtools.h>
  4936. + #include <dos/dosextens.h>
  4937. + #include <exec/ports.h>
  4938. + #include <exec/memory.h>
  4939. + #include <exec/types.h>
  4940. + #include <exec/tasks.h>
  4941. + #include <exec/io.h>
  4942. + #include <exec/libraries.h>
  4943. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  4944. + #include <graphics/gfxbase.h>
  4945. + #include <libraries/gadtools.h>
  4946. + #include <libraries/iffparse.h>
  4947. + #include <errno.h>
  4948. + #include <inetd.h>
  4949. + #include <sys/errno.h>
  4950. + #include <clib/alib_protos.h>
  4951. + #include <clib/dos_protos.h>
  4952. + #include <clib/exec_protos.h>
  4953. + #include <clib/iffparse_protos.h>
  4954. + #include <clib/intuition_protos.h>
  4955. + #include <clib/graphics_protos.h>
  4956. + #include <clib/gadtools_protos.h>
  4957. + #include <clib/diskfont_protos.h>
  4958. + #include <clib/iffparse_protos.h>
  4959. + #include <libraries/toccata.h>
  4960. + #include <clib/toccata_protos.h>
  4961. + #include <pragmas/toccata_pragmas.h>
  4962. + #include <exec/types.h>
  4963. + #include <exec/memory.h>
  4964. + #include <dos/dos.h>
  4965. + #include <rexx/storage.h>
  4966. + #include <rexx/rxslib.h>
  4967. + #include <dos/exall.h>
  4968. + #include <graphics/graphint.h>
  4969. + #include <intuition/classes.h>
  4970. + #include <devices/keymap.h>
  4971. + #include <exec/semaphores.h>
  4972. + #include <clib/alib_protos.h>
  4973. + #include <clib/exec_protos.h>
  4974. + #include <clib/dos_protos.h>
  4975. + #include <clib/rexxsyslib_protos.h>
  4976. + #include <pragmas/exec_pragmas.h>
  4977. + #include <pragmas/dos_pragmas.h>
  4978. + #include <pragmas/rexxsyslib_pragmas.h>
  4979. + #include <stdlib.h>
  4980. + #include <stdio.h>
  4981. + #include <string.h>
  4982. + #include <ctype.h>
  4983. + #include <dos/rdargs.h>
  4984. + #include <exec/types.h>
  4985. + #include <dos/dos.h>
  4986. + #include <rexx/storage.h>
  4987. + #include <exec/types.h>
  4988. + #include <exec/memory.h>
  4989. + #include <dos/dos.h>
  4990. + #include <rexx/storage.h>
  4991. + #include <rexx/rxslib.h>
  4992. + #include <dos/exall.h>
  4993. + #include <graphics/graphint.h>
  4994. + #include <intuition/classes.h>
  4995. + #include <devices/keymap.h>
  4996. + #include <exec/semaphores.h>
  4997. + #include <clib/alib_protos.h>
  4998. + #include <clib/exec_protos.h>
  4999. + #include <clib/dos_protos.h>
  5000. + #include <clib/rexxsyslib_protos.h>
  5001. + #include <pragmas/exec_pragmas.h>
  5002. + #include <pragmas/dos_pragmas.h>
  5003. + #include <pragmas/rexxsyslib_pragmas.h>
  5004. + #include <stdlib.h>
  5005. + #include <stdio.h>
  5006. + #include <string.h>
  5007. + #include <ctype.h>
  5008. + #include <netinclude:sys/types.h>
  5009. + #include <stdio.h>
  5010. + #include <stdlib.h>
  5011. + #include <errno.h>
  5012. + #include <string.h>
  5013. + #include <time.h>
  5014. + #include <exec/types.h>
  5015. + #include <exec/memory.h>
  5016. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  5017. + #include <dos/dosextens.h>
  5018. + #include <dos/var.h>
  5019. + #include <clib/exec_protos.h>
  5020. + #include <clib/intuition_protos.h>
  5021. + #include <clib/dos_protos.h>
  5022. + #include <intuition/intuition.h>
  5023. + #include <graphics/gfxbase.h>
  5024. + #include <proto/socket.h>
  5025. + #include <sys/errno.h>
  5026. + #include <sys/socket.h>
  5027. + #include <sys/ioctl.h>
  5028. + #include <sys/syslog.h>
  5029. + #include <netdb.h>
  5030. + #include <amitcp/socketbasetags.h>
  5031. + #include <pragmas/socket_pragmas.h>
  5032. + #include <inetd.h>
  5033. + #include <stdio.h>
  5034. + #include <stdlib.h>
  5035. + #include <exec/types.h>
  5036. + #include <proto/dos.h>
  5037. + #include <proto/exec.h>
  5038. + #include <proto/intuition.h>
  5039. + #include <libraries/dos.h>
  5040. + #include <intuition/intuition.h>
  5041. + #include <exec/io.h>
  5042. + #include <exec/memory.h>
  5043. + #include <string.h>
  5044. + #include <time.h>
  5045. + #include <hardware/dmabits.h>
  5046. + #include <hardware/intbits.h>
  5047. + #include <hardware/custom.h>
  5048. + #include <hardware/cia.h>
  5049. + #include <devices/audio.h>
  5050. + #include <resources/misc.h>
  5051. + #include <dos/dosextens.h>
  5052. + #include <exec/execbase.h>
  5053. + #include <exec/memory.h>
  5054. + #include <clib/exec_protos.h>
  5055. + #include <clib/misc_protos.h>
  5056. + #include <clib/dos_protos.h>
  5057. + #include <clib/alib_protos.h>
  5058. + #include <pragmas/exec_pragmas.h>
  5059. + #include <pragmas/misc_pragmas.h>
  5060. + #include <stdio.h>
  5061. + #include <time.h>
  5062. + #include <intuition/intuition.h>
  5063. + #include <intuition/intuitionbase.h>
  5064. + #include <intuition/screens.h>
  5065. + #include <intuition/gadgetclass.h>
  5066. + #include <libraries/gadtools.h>
  5067. + #include <exec/types.h>
  5068. + #include <exec/libraries.h>
  5069. + #include <libraries/dos.h>            /* contains RETURN_OK, RETURN_WARN #def's */
  5070. + #include <clib/exec_protos.h>
  5071. + #include <clib/intuition_protos.h>
  5072. + #include <clib/gadtools_protos.h>
  5073. + #include <string.h>
  5074. + #include <errno.h>
  5075. + #include <libraries/gadtools.h>
  5076. + #include <stdio.h>
  5077. + #include <string.h>
  5078. + #include <netinclude:sys/types.h>
  5079. + #include <exec/types.h>
  5080. + #include <exec/lists.h>
  5081. + #include <exec/memory.h>
  5082. + #include <clib/exec_protos.h>
  5083. + #include <clib/alib_protos.h>
  5084. + /* #include <errno.h> */
  5085. + #include <inetd.h>
  5086. + #include <sys/types.h>
  5087. + #include <proto/socket.h>
  5088. + #include <sys/errno.h>
  5089. + #include <sys/types.h>
  5090. + #include <sys/socket.h>
  5091. + #include <sys/ioctl.h>
  5092. + #include <sys/syslog.h>
  5093. + #include <pragmas/socket_pragmas.h>
  5094. + #include <CompilerSpecific.h>
  5095. + #include <CompilerSpecific.h>
  5096. + #include <exec/ports.h>
  5097. + #include <CompilerSpecific.h>
  5098. + #include <time.h>
  5099. + #include <stdio.h>
  5100. + #include <intuition/intuition.h>
  5101. + #include <intuition/intuitionbase.h>
  5102. + #include <intuition/gadgetclass.h>
  5103. + #include <clib/intuition_protos.h>
  5104. Only in ../AmiPhone_1.92: include
  5105. diff -r -C 2 -P ../AmiPhone_1.92/listen.c ./listen.c
  5106. *** ../AmiPhone_1.92/listen.c    Sat Nov 16 23:46:42 1996
  5107. --- ./listen.c    Sun Feb 15 23:04:29 1998
  5108. ***************
  5109. *** 1,2 ****
  5110. --- 1,3 ----
  5111. + /* :ts=4 */
  5112.   
  5113.   #include <stdio.h>
  5114. diff -r -C 2 -P ../AmiPhone_1.92/menuconstants.h ./menuconstants.h
  5115. *** ../AmiPhone_1.92/menuconstants.h    Sat Nov 16 23:46:42 1996
  5116. --- ./menuconstants.h    Mon Feb 16 04:01:41 1998
  5117. ***************
  5118. *** 2,32 ****
  5119.   /* menu constants */
  5120.   
  5121. ! #define P_ABOUT        100
  5122. ! #define P_QUIT        110
  5123.   
  5124. ! #define T_CONNECT    200
  5125.   #define T_CONNECTTO     210
  5126. ! #define T_DISCONNECT    220
  5127.   #define T_SHOWDAEMON    221
  5128.   
  5129. ! #define M_MESSAGES    300
  5130.   #define M_PLAYFILE      301
  5131.   #define M_RECORDMEMO    302
  5132.   
  5133. ! #define    S_DSS8        400
  5134. ! #define    S_PERFECTSOUND  401
  5135. ! #define    S_AMAS          402
  5136. ! #define    S_TOCCATA       403
  5137. ! #define    S_SOMAGIC       404
  5138. ! #define    S_AURA        405
  5139. ! #define S_AHI        406
  5140. ! #define S_DELFINA    407
  5141. ! #define S_CUSTOM    408
  5142. ! #define    S_GENERIC    409
  5143. ! #define S_ADPCM2    410
  5144. ! #define S_ADPCM3    411
  5145. ! #define S_NOCOMP    412
  5146. ! #define S_TOGGLE    413
  5147. ! #define S_HOLD        414
  5148.   #define S_RAISELINEGAIN 415
  5149.   #define S_LOWERLINEGAIN 416
  5150. --- 2,32 ----
  5151.   /* menu constants */
  5152.   
  5153. ! #define P_ABOUT         100
  5154. ! #define P_QUIT          110
  5155.   
  5156. ! #define T_CONNECT       200
  5157.   #define T_CONNECTTO     210
  5158. ! #define T_DISCONNECT    220
  5159.   #define T_SHOWDAEMON    221
  5160.   
  5161. ! #define M_MESSAGES      300
  5162.   #define M_PLAYFILE      301
  5163.   #define M_RECORDMEMO    302
  5164.   
  5165. ! #define S_DSS8          400
  5166. ! #define S_PERFECTSOUND  401
  5167. ! #define S_AMAS          402
  5168. ! #define S_TOCCATA       403
  5169. ! #define S_SOMAGIC       404
  5170. ! #define S_AURA          405
  5171. ! #define S_AHI           406
  5172. ! #define S_CUSTOM        407
  5173. ! #define S_GENERIC       408
  5174. ! #define S_AHIMODE       409
  5175. ! #define S_ADPCM2        410
  5176. ! #define S_ADPCM3        411
  5177. ! #define S_NOCOMP        412
  5178. ! #define S_TOGGLE        413
  5179. ! #define S_HOLD          414
  5180.   #define S_RAISELINEGAIN 415
  5181.   #define S_LOWERLINEGAIN 416
  5182. ***************
  5183. *** 34,50 ****
  5184.   #define S_ZEROMICGAIN   418
  5185.   #define S_AMPONE        419
  5186. ! #define S_AMPTWO    420
  5187. ! #define S_AMPFOUR    421
  5188.   #define S_LEFTCHANNEL   422
  5189.   #define S_RIGHTCHANNEL  423
  5190. ! #define S_INPUTMIC      424
  5191. ! #define S_INPUTEXT      425
  5192. ! #define S_ENABLEONCONN  426
  5193. ! #define S_XMITONPLAY    427
  5194. ! #define S_TCPBATCHXMIT  428
  5195.   
  5196.   
  5197.   /* slider id's */
  5198. ! #define FREQ_SLIDER    (1)
  5199. ! #define VOLUME_SLIDER    (2)
  5200. ! #define DELAY_SLIDER    (3)
  5201. --- 34,58 ----
  5202.   #define S_ZEROMICGAIN   418
  5203.   #define S_AMPONE        419
  5204. ! #define S_AMPTWO        420
  5205. ! #define S_AMPFOUR       421
  5206.   #define S_LEFTCHANNEL   422
  5207.   #define S_RIGHTCHANNEL  423
  5208. ! #define S_INPUTSRC0     424
  5209. ! #define S_INPUTSRC1     425
  5210. ! #define S_INPUTSRC2     426
  5211. ! #define S_INPUTSRC3     427
  5212. ! #define S_INPUTSRC4     428
  5213. ! #define S_INPUTSRC5     429
  5214. ! #define S_INPUTSRC6     430
  5215. ! #define S_INPUTSRC7     431
  5216. ! #define S_INPUTSRC8     432
  5217. ! #define S_INPUTSRC9     433
  5218. ! #define S_ENABLEONCONN  434
  5219. ! #define S_XMITONPLAY    435
  5220. ! #define S_TCPBATCHXMIT  436
  5221.   
  5222.   
  5223.   /* slider id's */
  5224. ! #define FREQ_SLIDER     (1)
  5225. ! #define VOLUME_SLIDER   (2)
  5226. ! #define DELAY_SLIDER    (3)
  5227. diff -r -C 2 -P ../AmiPhone_1.92/messages.c ./messages.c
  5228. *** ../AmiPhone_1.92/messages.c    Sat Nov 16 23:46:42 1996
  5229. --- ./messages.c    Mon Feb 16 01:09:14 1998
  5230. ***************
  5231. *** 1,6 ****
  5232. --- 1,8 ----
  5233.   /* AmiPhone!  by Jeremy Friesner - jfriesne@ucsd.edu */
  5234. + /* :ts=4 */
  5235.   
  5236.   #define INTUI_V36_NAMES_ONLY
  5237.   
  5238. + #include <netinclude:sys/types.h>
  5239.   #include <stdio.h>
  5240.   #include <stdlib.h> 
  5241. ***************
  5242. *** 26,34 ****
  5243.   #include <libraries/gadtools.h>
  5244.   #include <libraries/iffparse.h>
  5245. - #include <sys/types.h>
  5246.   
  5247.   #include <errno.h>
  5248.   #include <inetd.h>
  5249.   
  5250.   #include <clib/alib_protos.h>
  5251.   #include <clib/dos_protos.h>
  5252. --- 28,37 ----
  5253.   #include <libraries/gadtools.h>
  5254.   #include <libraries/iffparse.h>
  5255.   
  5256.   #include <errno.h>
  5257.   #include <inetd.h>
  5258.   
  5259. + #include <sys/errno.h>
  5260.   #include <clib/alib_protos.h>
  5261.   #include <clib/dos_protos.h>
  5262. ***************
  5263. *** 41,47 ****
  5264.   #include <clib/iffparse_protos.h>
  5265.   
  5266. ! #include "toccata/include/libraries/toccata.h"
  5267. ! #include "toccata/include/clib/toccata_protos.h"
  5268. ! #include "toccata/include/pragmas/toccata_pragmas.h"
  5269.   
  5270.   #include "AmiPhone.h"
  5271. --- 44,50 ----
  5272.   #include <clib/iffparse_protos.h>
  5273.   
  5274. ! #include <libraries/toccata.h>
  5275. ! #include <clib/toccata_protos.h>
  5276. ! #include <pragmas/toccata_pragmas.h>
  5277.   
  5278.   #include "AmiPhone.h"
  5279. ***************
  5280. *** 95,99 ****
  5281.   struct AmiPhonePacketHeader * TransferPacket;
  5282.   
  5283. ! __geta4 void SoundPlayerMain(void);
  5284.   
  5285.   /* private vars */
  5286. --- 98,102 ----
  5287.   struct AmiPhonePacketHeader * TransferPacket;
  5288.   
  5289. ! SAVEDS void SoundPlayerMain(void);
  5290.   
  5291.   /* private vars */
  5292. ***************
  5293. *** 142,146 ****
  5294.   /* This tasks opens a file requester and if a file is selected, sends
  5295.      a MESSAGE_PLAY_FILE to the SoundPort. */
  5296. ! __geta4 void FileReqMain(void)
  5297.   {
  5298.       char szFile[300];
  5299. --- 145,149 ----
  5300.   /* This tasks opens a file requester and if a file is selected, sends
  5301.      a MESSAGE_PLAY_FILE to the SoundPort. */
  5302. ! SAVEDS void FileReqMain(void)
  5303.   {
  5304.       char szFile[300];
  5305. ***************
  5306. *** 198,202 ****
  5307.      process to play the given sound, and may be stopped by sending it
  5308.      a control-C or a MESSAGE_DIE */
  5309. ! __geta4 void SoundPlayerMain(void)
  5310.   {
  5311.       char szBuf[5] = "\0\0\0\0\0";
  5312. --- 201,205 ----
  5313.      process to play the given sound, and may be stopped by sending it
  5314.      a control-C or a MESSAGE_DIE */
  5315. ! SAVEDS void SoundPlayerMain(void)
  5316.   {
  5317.       char szBuf[5] = "\0\0\0\0\0";
  5318. diff -r -C 2 -P ../AmiPhone_1.92/phonerexx.arb ./phonerexx.arb
  5319. *** ../AmiPhone_1.92/phonerexx.arb    Sat Nov 16 23:46:40 1996
  5320. --- ./phonerexx.arb    Sun Feb 15 23:32:01 1998
  5321. ***************
  5322. *** 1,8 ****
  5323.   ARB
  5324. ! $1 831931909 27
  5325.   AmiPhone
  5326.   0
  5327.   BROWSER
  5328. ! $1 24 N
  5329.   $2 N
  5330.   SHOW/S
  5331. --- 1,8 ----
  5332.   ARB
  5333. ! $1 831931909 28
  5334.   AmiPhone
  5335.   0
  5336.   BROWSER
  5337. ! $1 24 O
  5338.   $2 N
  5339.   SHOW/S
  5340. ***************
  5341. *** 11,15 ****
  5342.   -
  5343.   CONNECT
  5344. ! $1 2 N
  5345.   $2 N
  5346.   HOSTNAME
  5347. --- 11,15 ----
  5348.   -
  5349.   CONNECT
  5350. ! $1 2 O
  5351.   $2 N
  5352.   HOSTNAME
  5353. ***************
  5354. *** 19,23 ****
  5355.   -
  5356.   CONNECTTO
  5357. ! $1 4 N
  5358.   $2 N
  5359.   ENTRY/N
  5360. --- 19,23 ----
  5361.   -
  5362.   CONNECTTO
  5363. ! $1 4 O
  5364.   $2 N
  5365.   ENTRY/N
  5366. ***************
  5367. *** 27,31 ****
  5368.   -
  5369.   DAEMON
  5370. ! $1 25 N
  5371.   $2 N
  5372.   SHOW/S
  5373. --- 27,31 ----
  5374.   -
  5375.   DAEMON
  5376. ! $1 25 O
  5377.   $2 N
  5378.   SHOW/S
  5379. ***************
  5380. *** 34,53 ****
  5381.   -
  5382.   DISABLE
  5383. ! $1 22 N
  5384.   $2 N
  5385.   -
  5386.   -
  5387.   DISCONNECT
  5388. ! $1 3 N
  5389.   $2 N
  5390.   -
  5391.   -
  5392.   ENABLE
  5393. ! $1 21 N
  5394.   $2 N
  5395.   -
  5396.   -
  5397.   GETSTATE
  5398. ! $1 23 N
  5399.   $2 N
  5400.   -
  5401. --- 34,53 ----
  5402.   -
  5403.   DISABLE
  5404. ! $1 22 O
  5405.   $2 N
  5406.   -
  5407.   -
  5408.   DISCONNECT
  5409. ! $1 3 O
  5410.   $2 N
  5411.   -
  5412.   -
  5413.   ENABLE
  5414. ! $1 21 O
  5415.   $2 N
  5416.   -
  5417.   -
  5418.   GETSTATE
  5419. ! $1 23 O
  5420.   $2 N
  5421.   -
  5422. ***************
  5423. *** 78,82 ****
  5424.   -
  5425.   MEMO
  5426. ! $1 6 N
  5427.   $2 N
  5428.   START/S
  5429. --- 78,82 ----
  5430.   -
  5431.   MEMO
  5432. ! $1 6 O
  5433.   $2 N
  5434.   START/S
  5435. ***************
  5436. *** 86,90 ****
  5437.   -
  5438.   PLAYFILE
  5439. ! $1 5 N
  5440.   $2 N
  5441.   FILENAME
  5442. --- 86,90 ----
  5443.   -
  5444.   PLAYFILE
  5445. ! $1 5 O
  5446.   $2 N
  5447.   FILENAME
  5448. ***************
  5449. *** 94,103 ****
  5450.   -
  5451.   QUIT
  5452. ! $1 1 N
  5453.   $2 N
  5454.   -
  5455.   -
  5456.   SETCOMPRESSION
  5457. ! $1 8 N
  5458.   $2 N
  5459.   ADPCM2/S
  5460. --- 94,109 ----
  5461.   -
  5462.   QUIT
  5463. ! $1 1 O
  5464.   $2 N
  5465.   -
  5466.   -
  5467. + SETAHIMODE
  5468. + $1 27 O
  5469. + $2 N
  5470. + MODE/N
  5471. + -
  5472. + -
  5473.   SETCOMPRESSION
  5474. ! $1 8 O
  5475.   $2 N
  5476.   ADPCM2/S
  5477. ***************
  5478. *** 107,111 ****
  5479.   -
  5480.   SETENABLEONCONNECT
  5481. ! $1 14 N
  5482.   $2 N
  5483.   ON/S
  5484. --- 113,117 ----
  5485.   -
  5486.   SETENABLEONCONNECT
  5487. ! $1 14 O
  5488.   $2 N
  5489.   ON/S
  5490. ***************
  5491. *** 114,118 ****
  5492.   -
  5493.   SETINPUTAMPLIFY
  5494. ! $1 11 N
  5495.   $2 N
  5496.   MULTIPLIER/N
  5497. --- 120,124 ----
  5498.   -
  5499.   SETINPUTAMPLIFY
  5500. ! $1 11 O
  5501.   $2 N
  5502.   MULTIPLIER/N
  5503. ***************
  5504. *** 120,124 ****
  5505.   -
  5506.   SETINPUTCHANNEL
  5507. ! $1 12 N
  5508.   $2 N
  5509.   LEFT/S
  5510. --- 126,130 ----
  5511.   -
  5512.   SETINPUTCHANNEL
  5513. ! $1 12 O
  5514.   $2 N
  5515.   LEFT/S
  5516. ***************
  5517. *** 127,131 ****
  5518.   -
  5519.   SETINPUTGAIN
  5520. ! $1 10 N
  5521.   $2 N
  5522.   GAIN/N
  5523. --- 133,137 ----
  5524.   -
  5525.   SETINPUTGAIN
  5526. ! $1 10 O
  5527.   $2 N
  5528.   GAIN/N
  5529. ***************
  5530. *** 134,145 ****
  5531.   -
  5532.   SETINPUTSOURCE
  5533. ! $1 15 N
  5534.   $2 N
  5535.   MIC/S
  5536.   LINE/S
  5537.   -
  5538.   -
  5539.   SETSAMPLER
  5540. ! $1 7 N
  5541.   $2 N
  5542.   DSS8/S
  5543. --- 140,152 ----
  5544.   -
  5545.   SETINPUTSOURCE
  5546. ! $1 15 O
  5547.   $2 N
  5548.   MIC/S
  5549.   LINE/S
  5550. + AHIINPUT/N
  5551.   -
  5552.   -
  5553.   SETSAMPLER
  5554. ! $1 7 O
  5555.   $2 N
  5556.   DSS8/S
  5557. ***************
  5558. *** 155,159 ****
  5559.   -
  5560.   SETSAMPLERATE
  5561. ! $1 18 N
  5562.   $2 N
  5563.   RATE/N
  5564. --- 162,166 ----
  5565.   -
  5566.   SETSAMPLERATE
  5567. ! $1 18 O
  5568.   $2 N
  5569.   RATE/N
  5570. ***************
  5571. *** 161,165 ****
  5572.   -
  5573.   SETTCPBATCHXMIT
  5574. ! $1 17 N
  5575.   $2 N
  5576.   ON/S
  5577. --- 168,172 ----
  5578.   -
  5579.   SETTCPBATCHXMIT
  5580. ! $1 17 O
  5581.   $2 N
  5582.   ON/S
  5583. ***************
  5584. *** 168,172 ****
  5585.   -
  5586.   SETTHRESHVOL
  5587. ! $1 20 N
  5588.   $2 N
  5589.   THRESHOLD/N
  5590. --- 175,179 ----
  5591.   -
  5592.   SETTHRESHVOL
  5593. ! $1 20 O
  5594.   $2 N
  5595.   THRESHOLD/N
  5596. ***************
  5597. *** 174,178 ****
  5598.   -
  5599.   SETXMITDELAY
  5600. ! $1 19 N
  5601.   $2 N
  5602.   MILLISECONDS/N
  5603. --- 181,185 ----
  5604.   -
  5605.   SETXMITDELAY
  5606. ! $1 19 O
  5607.   $2 N
  5608.   MILLISECONDS/N
  5609. ***************
  5610. *** 180,184 ****
  5611.   -
  5612.   SETXMITENABLE
  5613. ! $1 9 N
  5614.   $2 N
  5615.   HOLD/S
  5616. --- 187,191 ----
  5617.   -
  5618.   SETXMITENABLE
  5619. ! $1 9 O
  5620.   $2 N
  5621.   HOLD/S
  5622. ***************
  5623. *** 187,191 ****
  5624.   -
  5625.   SETXMITONPLAY
  5626. ! $1 16 N
  5627.   $2 N
  5628.   ON/S
  5629. --- 194,198 ----
  5630.   -
  5631.   SETXMITONPLAY
  5632. ! $1 16 O
  5633.   $2 N
  5634.   ON/S
  5635. ***************
  5636. *** 194,198 ****
  5637.   -
  5638.   ZOOM
  5639. ! $1 26 N
  5640.   $2 N
  5641.   BIG/S
  5642. --- 201,205 ----
  5643.   -
  5644.   ZOOM
  5645. ! $1 26 O
  5646.   $2 N
  5647.   BIG/S
  5648. diff -r -C 2 -P ../AmiPhone_1.92/phonerexx.c ./phonerexx.c
  5649. *** ../AmiPhone_1.92/phonerexx.c    Sat Nov 16 23:46:42 1996
  5650. --- ./phonerexx.c    Mon Feb 16 00:21:08 1998
  5651. ***************
  5652. *** 26,35 ****
  5653.   #ifndef __NO_PRAGMAS
  5654.   
  5655. - #ifdef AZTEC_C
  5656. - #include <pragmas/exec_lib.h>
  5657. - #include <pragmas/dos_lib.h>
  5658. - #include <pragmas/rexxsyslib_lib.h>
  5659. - #endif
  5660.   #ifdef LATTICE
  5661.   #include <pragmas/exec_pragmas.h>
  5662. --- 26,29 ----
  5663. ***************
  5664. *** 58,63 ****
  5665.   #endif
  5666.   
  5667.   #define inline
  5668.   
  5669.   #include <dos/rdargs.h>
  5670. --- 52,58 ----
  5671.   #endif
  5672.   
  5673. + #ifdef AZTEC_C
  5674.   #define inline
  5675. ! #endif
  5676.   
  5677.   #include <dos/rdargs.h>
  5678. diff -r -C 2 -P ../AmiPhone_1.92/phonerexx.h ./phonerexx.h
  5679. *** ../AmiPhone_1.92/phonerexx.h    Sat Nov 16 23:46:42 1996
  5680. --- ./phonerexx.h    Mon Feb 16 00:22:28 1998
  5681. ***************
  5682. *** 203,206 ****
  5683. --- 203,216 ----
  5684.   void rx_quit( struct RexxHost *, struct rxd_quit **, long, struct RexxMsg * );
  5685.   
  5686. + struct rxd_setahimode
  5687. + {
  5688. +     long rc, rc2;
  5689. +     struct {
  5690. +         long *mode;
  5691. +     } arg;
  5692. + };
  5693. + void rx_setahimode( struct RexxHost *, struct rxd_setahimode **, long, struct RexxMsg * );
  5694.   struct rxd_setcompression
  5695.   {
  5696. ***************
  5697. *** 264,267 ****
  5698. --- 274,278 ----
  5699.           long mic;
  5700.           long line;
  5701. +         long *ahiinput;
  5702.       } arg;
  5703.   };
  5704. diff -r -C 2 -P ../AmiPhone_1.92/phonerexx_rxcl.c ./phonerexx_rxcl.c
  5705. *** ../AmiPhone_1.92/phonerexx_rxcl.c    Sat Nov 16 23:46:42 1996
  5706. --- ./phonerexx_rxcl.c    Mon Feb 16 00:22:17 1998
  5707. ***************
  5708. *** 29,32 ****
  5709. --- 29,33 ----
  5710.       { "PLAYFILE", "FILENAME,RATE/N,PROMPT/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_playfile, 1 },
  5711.       { "QUIT", NULL, NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_quit, 1 },
  5712. +     { "SETAHIMODE", "MODE/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setahimode, 1 },
  5713.       { "SETCOMPRESSION", "ADPCM2/S,ADPCM3/S,NONE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setcompression, 1 },
  5714.       { "SETENABLEONCONNECT", "ON/S,OFF/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setenableonconnect, 1 },
  5715. ***************
  5716. *** 34,38 ****
  5717.       { "SETINPUTCHANNEL", "LEFT/S,RIGHT/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputchannel, 1 },
  5718.       { "SETINPUTGAIN", "GAIN/N,RELATIVE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputgain, 1 },
  5719. !     { "SETINPUTSOURCE", "MIC/S,LINE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputsource, 1 },
  5720.       { "SETSAMPLER", "DSS8/S,PERFECTSOUND/S,AMAS/S,SOUNDMAGIC/S,TOCCATA/S,AURA/S,AHI/S,CUSTOM/S,GENERIC/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setsampler, 1 },
  5721.       { "SETSAMPLERATE", "RATE/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setsamplerate, 1 },
  5722. --- 35,39 ----
  5723.       { "SETINPUTCHANNEL", "LEFT/S,RIGHT/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputchannel, 1 },
  5724.       { "SETINPUTGAIN", "GAIN/N,RELATIVE/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputgain, 1 },
  5725. !     { "SETINPUTSOURCE", "MIC/S,LINE/S,AHIINPUT/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setinputsource, 1 },
  5726.       { "SETSAMPLER", "DSS8/S,PERFECTSOUND/S,AMAS/S,SOUNDMAGIC/S,TOCCATA/S,AURA/S,AHI/S,CUSTOM/S,GENERIC/S", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setsampler, 1 },
  5727.       { "SETSAMPLERATE", "RATE/N", NULL, 0, (void (*)(struct RexxHost *,void **,long,struct RexxMsg *)) rx_setsamplerate, 1 },
  5728. ***************
  5729. *** 46,58 ****
  5730.   };
  5731.   
  5732. ! int        command_cnt = 25;
  5733.   
  5734.   static struct arb_p_link link0[] = {
  5735. !     {"ZOOM", 1}, {"SET", 2}, {"QUIT", 19}, {"PLAYFILE", 20}, {"MEMO", 21}, {"GETSTATE", 22},
  5736. !     {"ENABLE", 23}, {"D", 24}, {"CONNECT", 29}, {"BROWSER", 31}, {NULL, 0} };
  5737.   
  5738.   static struct arb_p_link link2[] = {
  5739.       {"XMIT", 3}, {"T", 7}, {"SAMPLER", 10}, {"INPUT", 12}, {"ENABLEONCONNECT", 17}, {"COMPRESSION", 18},
  5740. !     {NULL, 0} };
  5741.   
  5742.   static struct arb_p_link link3[] = {
  5743. --- 47,59 ----
  5744.   };
  5745.   
  5746. ! int        command_cnt = 26;
  5747.   
  5748.   static struct arb_p_link link0[] = {
  5749. !     {"ZOOM", 1}, {"SET", 2}, {"QUIT", 20}, {"PLAYFILE", 21}, {"MEMO", 22}, {"GETSTATE", 23},
  5750. !     {"ENABLE", 24}, {"D", 25}, {"CONNECT", 30}, {"BROWSER", 32}, {NULL, 0} };
  5751.   
  5752.   static struct arb_p_link link2[] = {
  5753.       {"XMIT", 3}, {"T", 7}, {"SAMPLER", 10}, {"INPUT", 12}, {"ENABLEONCONNECT", 17}, {"COMPRESSION", 18},
  5754. !     {"AHIMODE", 19}, {NULL, 0} };
  5755.   
  5756.   static struct arb_p_link link3[] = {
  5757. ***************
  5758. *** 68,87 ****
  5759.       {"SOURCE", 13}, {"GAIN", 14}, {"CHANNEL", 15}, {"AMPLIFY", 16}, {NULL, 0} };
  5760.   
  5761. - static struct arb_p_link link24[] = {
  5762. -     {"IS", 25}, {"AEMON", 28}, {NULL, 0} };
  5763.   static struct arb_p_link link25[] = {
  5764. !     {"CONNECT", 26}, {"ABLE", 27}, {NULL, 0} };
  5765.   
  5766. ! static struct arb_p_link link29[] = {
  5767. !     {"TO", 30}, {NULL, 0} };
  5768.   
  5769.   struct arb_p_state arb_p_state[] = {
  5770. !     {-1, link0}, {24, NULL}, {11, link2}, {21, link3}, {23, NULL},
  5771. !     {22, NULL}, {21, NULL}, {19, link7}, {20, NULL}, {19, NULL},
  5772. !     {17, link10}, {18, NULL}, {13, link12}, {16, NULL}, {15, NULL},
  5773. !     {14, NULL}, {13, NULL}, {12, NULL}, {11, NULL}, {10, NULL},
  5774. !     {9, NULL}, {8, NULL}, {7, NULL}, {6, NULL}, {3, link24},
  5775. !     {4, link25}, {5, NULL}, {4, NULL}, {3, NULL}, {1, link29},
  5776. !     {2, NULL}, {0, NULL}  };
  5777.   
  5778. --- 69,88 ----
  5779.       {"SOURCE", 13}, {"GAIN", 14}, {"CHANNEL", 15}, {"AMPLIFY", 16}, {NULL, 0} };
  5780.   
  5781.   static struct arb_p_link link25[] = {
  5782. !     {"IS", 26}, {"AEMON", 29}, {NULL, 0} };
  5783. ! static struct arb_p_link link26[] = {
  5784. !     {"CONNECT", 27}, {"ABLE", 28}, {NULL, 0} };
  5785.   
  5786. ! static struct arb_p_link link30[] = {
  5787. !     {"TO", 31}, {NULL, 0} };
  5788.   
  5789.   struct arb_p_state arb_p_state[] = {
  5790. !     {-1, link0}, {25, NULL}, {11, link2}, {22, link3}, {24, NULL},
  5791. !     {23, NULL}, {22, NULL}, {20, link7}, {21, NULL}, {20, NULL},
  5792. !     {18, link10}, {19, NULL}, {14, link12}, {17, NULL}, {16, NULL},
  5793. !     {15, NULL}, {14, NULL}, {13, NULL}, {12, NULL}, {11, NULL},
  5794. !     {10, NULL}, {9, NULL}, {8, NULL}, {7, NULL}, {6, NULL},
  5795. !     {3, link25}, {4, link26}, {5, NULL}, {4, NULL}, {3, NULL},
  5796. !     {1, link30}, {2, NULL}, {0, NULL}  };
  5797.   
  5798. diff -r -C 2 -P ../AmiPhone_1.92/phonerexx_rxif.c ./phonerexx_rxif.c
  5799. *** ../AmiPhone_1.92/phonerexx_rxif.c    Sat Nov 16 23:46:42 1996
  5800. --- ./phonerexx_rxif.c    Sat Feb 28 00:33:47 1998
  5801. ***************
  5802. *** 3,6 ****
  5803. --- 3,7 ----
  5804.    * which is Copyright (c) 1992,1993 Michael Balzer
  5805.    */
  5806. + /* :ts=2 */
  5807.   
  5808.   #include <exec/types.h>
  5809. ***************
  5810. *** 26,35 ****
  5811.   #ifndef __NO_PRAGMAS
  5812.   
  5813. - #ifdef AZTEC_C
  5814. - #include <pragmas/exec_lib.h>
  5815. - #include <pragmas/dos_lib.h>
  5816. - #include <pragmas/rexxsyslib_lib.h>
  5817. - #endif
  5818.   #ifdef LATTICE
  5819.   #include <pragmas/exec_pragmas.h>
  5820. --- 27,30 ----
  5821. ***************
  5822. *** 69,72 ****
  5823. --- 64,68 ----
  5824.   extern struct RxsLib *RexxSysBase;
  5825.   
  5826. + extern ULONG ulAHIMode;
  5827.   
  5828.   /* $ARB: I 831931909 */
  5829. ***************
  5830. *** 525,530 ****
  5831.               /* Insert your CODE here */
  5832.               if (rd->arg.mic)  ChangeInputSource(INPUT_SOURCE_MIC, TRUE);
  5833. !             if (rd->arg.line) ChangeInputSource(INPUT_SOURCE_EXT, TRUE);
  5834. !             rd->rc = (rd->arg.mic || rd->arg.line);
  5835.               break;
  5836.           
  5837. --- 521,527 ----
  5838.               /* Insert your CODE here */
  5839.               if (rd->arg.mic)  ChangeInputSource(INPUT_SOURCE_MIC, TRUE);
  5840. !             else if (rd->arg.line) ChangeInputSource(INPUT_SOURCE_EXT, TRUE);
  5841. !             else if (rd->arg.ahiinput) ChangeInputSource(*rd->arg.ahiinput, TRUE);
  5842. !             rd->rc = (rd->arg.mic || rd->arg.line || rd->arg.ahiinput);
  5843.               break;
  5844.           
  5845. ***************
  5846. *** 794,801 ****
  5847.                       rd->res.inputchannel = szResChannel;
  5848.   
  5849. !                  if (ubInputSource == INPUT_SOURCE_MIC) strcpy(szResSource,"MIC");
  5850. !             else if (ubInputSource == INPUT_SOURCE_EXT) strcpy(szResSource,"LINE");
  5851. !             else strcpy(szResSource, "????");
  5852. !                     rd->res.inputsource = szResSource;
  5853.   
  5854.               GetSamplerType(szResSampler, ubSamplerType);
  5855. --- 791,805 ----
  5856.                       rd->res.inputchannel = szResChannel;
  5857.   
  5858. !             if(ubSamplerType != SAMPLER_AHI)
  5859. !             {
  5860. !                      if (ubInputSource == INPUT_SOURCE_MIC) strcpy(szResSource,"MIC");
  5861. !                 else if (ubInputSource == INPUT_SOURCE_EXT) strcpy(szResSource,"LINE");
  5862. !                 else strcpy(szResSource, "????");
  5863. !             }
  5864. !             else
  5865. !             {
  5866. !                 sprintf(szResSource, "%d", ubInputSource);
  5867. !             }
  5868. !       rd->res.inputsource = szResSource;
  5869.   
  5870.               GetSamplerType(szResSampler, ubSamplerType);
  5871. ***************
  5872. *** 947,950 ****
  5873. --- 951,987 ----
  5874.   }
  5875.   /* $ARB: E 26 ZOOM */
  5876. + /* $ARB: B 27 SETAHIMODE */
  5877. + void rx_setahimode( struct RexxHost *host, struct rxd_setahimode **rxd, long action, struct RexxMsg *rexxmsg )
  5878. + {
  5879. +     struct rxd_setahimode *rd = *rxd;
  5880. +     switch( action )
  5881. +     {
  5882. +         case RXIF_INIT:
  5883. +             *rxd = AllocVec( sizeof *rd, MEMF_CLEAR );
  5884. +             if( rd = *rxd )
  5885. +             {
  5886. +                 /* set your DEFAULTS here */
  5887. +             }
  5888. +             break;
  5889. +             
  5890. +         case RXIF_ACTION:
  5891. +             /* Insert your CODE here */
  5892. +             if (rd->arg.mode)
  5893. +             {
  5894. +               ulAHIMode = *rd->arg.mode;
  5895. +                 rd->rc = 1;
  5896. +             } else rd->rc = 0;
  5897. +             break;
  5898. +         
  5899. +         case RXIF_FREE:
  5900. +             /* FREE your local data here */
  5901. +             FreeVec( rd );
  5902. +             break;
  5903. +     }
  5904. +     return;
  5905. + }
  5906. + /* $ARB: E 27 SETAHIMODE */
  5907.   
  5908.   
  5909. diff -r -C 2 -P ../AmiPhone_1.92/phoneudp.c ./phoneudp.c
  5910. *** ../AmiPhone_1.92/phoneudp.c    Sat Nov 16 23:46:40 1996
  5911. --- ./phoneudp.c    Mon Feb 16 06:47:08 1998
  5912. ***************
  5913. *** 1,4 ****
  5914. ! #define DICE_C
  5915.   
  5916.   #include <stdio.h>
  5917.   #include <stdlib.h>
  5918. --- 1,5 ----
  5919. ! /* :ts=4 */
  5920.   
  5921. + #include <netinclude:sys/types.h>
  5922.   #include <stdio.h>
  5923.   #include <stdlib.h>
  5924. ***************
  5925. *** 21,25 ****
  5926.   #include <proto/socket.h>
  5927.   #include <sys/errno.h>
  5928. - #include <sys/types.h>
  5929.   #include <sys/socket.h>
  5930.   #include <sys/ioctl.h>
  5931. --- 22,25 ----
  5932. ***************
  5933. *** 39,43 ****
  5934.   
  5935.   /* Why does this come out as 18 unless I define it explicitely here?  Weird! */
  5936. ! #define EWOULDBLOCK 35
  5937.   
  5938.   /* Prototypes for the compression/decompression asm functions! */
  5939. --- 39,43 ----
  5940.   
  5941.   /* Why does this come out as 18 unless I define it explicitely here?  Weird! */
  5942. ! /* #define EWOULDBLOCK 35 */
  5943.   
  5944.   /* Prototypes for the compression/decompression asm functions! */
  5945. ***************
  5946. *** 359,369 ****
  5947.           WaitSelect(nMaxSocket+1, &fsReadSet, &fsWriteSet, NULL, NULL, &Mask);
  5948.               
  5949. !         if (FD_ISSET(sTCPSocket, &fsReadSet)) ProcessReply();
  5950. !         if (FD_ISSET(sTCPSocket, &fsWriteSet)) 
  5951.           {
  5952. !             ulBytesSentSince += ReduceTCPQueue(0,sTCPSocket);
  5953. !             SetWindowTitle(NULL);
  5954. !         }
  5955. !         
  5956.           return(Mask);
  5957.       }
  5958. --- 359,375 ----
  5959.           WaitSelect(nMaxSocket+1, &fsReadSet, &fsWriteSet, NULL, NULL, &Mask);
  5960.               
  5961. !         if (sTCPSocket != -1)
  5962.           {
  5963. !               if (FD_ISSET(sTCPSocket, &fsReadSet)) ProcessReply();
  5964. !           }
  5965. !         if (sTCPSocket != -1) 
  5966. !         {
  5967. !                  if (FD_ISSET(sTCPSocket, &fsWriteSet)) 
  5968. !             {
  5969. !                 ulBytesSentSince += ReduceTCPQueue(0,sTCPSocket);
  5970. !                   SetWindowTitle(NULL);
  5971. !               }
  5972. !         }
  5973.           return(Mask);
  5974.       }
  5975. Only in ../AmiPhone_1.92: phoneudp.c.info
  5976. diff -r -C 2 -P ../AmiPhone_1.92/smakefile ./smakefile
  5977. *** ../AmiPhone_1.92/smakefile    Thu Jan  1 01:00:00 1970
  5978. --- ./smakefile    Sat Feb 28 12:25:20 1998
  5979. ***************
  5980. *** 0 ****
  5981. --- 1,200 ----
  5982. + ##
  5983. + ## Macros
  5984. + ##
  5985. + ###############################################################################
  5986. + CC        = SC:C/SC IDIR=NetInclude: DEBUG=FULL NOSTACKCHECK NOICONS\
  5987. +           STRUCTUREEQUIVALENCE MULTIPLECHARACTERCONSTANTS\
  5988. +           OPTIMIZE OPTTIME OPTSCHED #GST=gst
  5989. + LD        = SC:C/SLink NOICONS LIB LIB:sc.lib LIB:scm.lib LIB:debug.lib LIB:amiga.lib
  5990. + ASM        = Programmering:PhxAss/Bin/PhxAss I=include: SD SC
  5991. + ASM_OBJS     = inthandler.o compress/ADPCM2_Crunch.o compress/ADPCM3_Crunch.o\
  5992. +           compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o
  5993. + C_OBJS        = ciatimer.o AmiPhone.o phoneudp.o stringrequest.o microphone.o\
  5994. +           messages.o asl.o codec_c.o browse.o TCPQueue.o phonerexx.o\
  5995. +           phonerexx_rxif.o phonerexx_rxcl.o
  5996. + ##
  5997. + ## Default rules
  5998. + ##
  5999. + ###############################################################################
  6000. + .c.o:
  6001. +     $(CC) $< OBJNAME $@
  6002. + .a.o:
  6003. +     $(ASM) $< TO $@
  6004. + ##
  6005. + ## Targets
  6006. + ##
  6007. + ###############################################################################
  6008. + all:        AmiPhone AmiPhoned AmiPhoned_debug PhoneUtil
  6009. + AmiPhone:    $(ASM_OBJS) $(C_OBJS)
  6010. +     $(LD) TO $@ FROM LIB:c.o $(ASM_OBJS) $(C_OBJS) 
  6011. + AmiPhoned:    AmiPhoned.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o codec_s.o stringrequest.o TCPQueue.o
  6012. +     $(LD) TO $@ FROM LIB:c.o AmiPhoned.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o codec_s.o stringrequest.o TCPQueue.o
  6013. + AmiPhoned_debug: AmiPhoned_debug.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o codec_s.o stringrequest.o TCPQueue.o
  6014. +     $(LD) TO $@ FROM LIB:c.o AmiPhoned_debug.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o codec_s.o stringrequest.o TCPQueue.o
  6015. + PhoneUtil:    PhoneUtil.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o compress/ADPCM2_Crunch.o compress/ADPCM3_Crunch.o codec_v.o
  6016. +     $(LD) TO $@ FROM LIB:c.o PhoneUtil.o compress/ADPCM2_Decrunch.o compress/ADPCM3_Decrunch.o compress/ADPCM2_Crunch.o compress/ADPCM3_Crunch.o codec_v.o
  6017. + ##
  6018. + ## Rules
  6019. + ##
  6020. + ###############################################################################
  6021. + codec_c.o: codec.c AmiPhoned.h AmiPhone.h AmiPhoneMsg.h AmiPhonePacket.h\
  6022. +      codec.h TCPQueue.h
  6023. +     $(CC) FROM $< OBJNAME $@ DEFINE AMIPHONE
  6024. + codec_v.o: codec.c AmiPhoned.h AmiPhone.h AmiPhoneMsg.h AmiPhonePacket.h\
  6025. +      codec.h TCPQueue.h
  6026. +     $(CC) FROM $< OBJNAME $@ DEFINE CONV_UTIL
  6027. + codec_s.o: codec.c AmiPhoned.h AmiPhone.h AmiPhoneMsg.h AmiPhonePacket.h\
  6028. +      codec.h TCPQueue.h
  6029. + microphone.c:    microphone.brush
  6030. +     citas microphone.brush -c -m -h -o -s 
  6031. + AmiPhoned_debug.o: amiphoned.c AmiPhoned.h AmiPhoneMsg.h AmiPhonePacket.h\
  6032. +      codec.h TCPQueue.h
  6033. +     $(CC) FROM $< OBJNAME $@ DEFINE DEBUG_FLAG
  6034. + inthandler.o:            inthandler.a
  6035. + compress/ADPCM2_Crunch.o:    compress/ADPCM2_Crunch.a
  6036. + compress/ADPCM3_Crunch.o:    compress/ADPCM3_Crunch.a
  6037. + compress/ADPCM2_Decrunch.o:    compress/ADPCM2_Decrunch.a
  6038. + compress/ADPCM3_Decrunch.o:    compress/ADPCM3_Decrunch.a
  6039. + #$(C_OBJS):    gst
  6040. + ##
  6041. + ## GST
  6042. + ##
  6043. + ###############################################################################
  6044. + gst:
  6045. +     # Don't cache my own include files
  6046. +     grep -h "\#include <" *.c *.h > gst.c
  6047. +     $(CC) NOOBJNAME MGST=gst gst.c
  6048. +     -delete gst.c QUIET
  6049. + ##
  6050. + ## Other targets
  6051. + ##
  6052. + ###############################################################################
  6053. + clean:       
  6054. +     -delete \#?.o QUIET
  6055. +     -delete compress/\#?.o QUIET
  6056. +     -delete \#?.bak QUIET
  6057. +     -delete AmiPhone AmiPhoned AmiPhoned_debug PhoneUtil QUIET
  6058. +     -delete gst QUIET
  6059. +     -avail flush   # Flush gst from memory
  6060. + diff:
  6061. +     -delete Source.patch
  6062. +     -diff -r -C 2 -P ../AmiPhone_1.92 . > T:Source.patch
  6063. +     copy T:Source.patch ""
  6064. +     -delete T:Source.patch
  6065. + depend:
  6066. +     makedepend -f smakefile amiphone.c amiphoned.c asl.c browse.c ciatimer.c\
  6067. +     codec.c listen.c messages.c microphone.c phonerexx.c phonerexx_rxcl.c\
  6068. +     phonerexx_rxif.c phoneudp.c PhoneUtil.c Sampler.c StringRequest.c TCPQueue.c
  6069. + archive:
  6070. +     smake clean
  6071. +     -delete ram:AmiPhoneSource.lha ram:src all
  6072. +     makedir ram:src
  6073. +     copy #? ram:src all
  6074. +     lha -r a ram:AmiPhoneSource.lha ram:src
  6075. +     @echo "archive made in ram:"
  6076. +      
  6077. + dist:    AmiPhone AmiPhoned AmiPhoned_debug PhoneUtil
  6078. +     -delete ram:AmiPhone all
  6079. +     -delete ram:AmiPhone.info
  6080. +     -delete ram:AmiPhone.lha
  6081. +     makedir ram:AmiPhone
  6082. +     $(LD) ND NOICONS FROM AmiPhone TO ram:AmiPhone/AmiPhone
  6083. +     copy AmiPhoneIcon.info ram:AmiPhone/AmiPhone.info
  6084. +     $(LD) ND NOICONS FROM AmiPhoned TO ram:AmiPhone/AmiPhoned
  6085. +     $(LD) ND NOICONS FROM AmiPhoned_debug TO ram:AmiPhone/AmiPhoned_debug
  6086. +     copy Install_AmiPhone ram:AmiPhone
  6087. +     copy Install_AmiPhone.info ram:AmiPhone
  6088. +     copy AmiPhone.guide ram:AmiPhone
  6089. +     copy AmiPhone.guide.icon.info ram:AmiPhone/AmiPhone.guide.info
  6090. +     copy AmiPhoneDrawer.info ram:AmiPhone.info
  6091. +     copy README ram:AmiPhone
  6092. +     copy README ram:AmiPhone.readme
  6093. +     copy README.icon.info ram:AmiPhone/README.info
  6094. +     $(LD) ND NOICONS FROM PhoneUtil TO ram:AmiPhone/PhoneUtil
  6095. +     copy EditTextFile.rexx ram:AmiPhone
  6096. +     copy Source.patch ram:AmiPhone
  6097. +     lha -r a ram:AmiPhone.lha ram:AmiPhone ram:AmiPhone.info
  6098. +     @echo "distribution made in ram:"
  6099. + #DEPENDENCIES
  6100. + amiphone.o: amiphone.c phonerexx.h menuconstants.h ciatimer.h\
  6101. +      phoneudp.h AmiPhonePacket.h messages.h AmiPhoneMsg.h browse.h\
  6102. +      stringrequest.h TCPQueue.h
  6103. + amiphoned.o: amiphoned.c AmiPhoned.h AmiPhoneMsg.h AmiPhonePacket.h\
  6104. +      codec.h TCPQueue.h
  6105. + asl.o: asl.c codec.h asl.h
  6106. + browse.o: browse.c AmiPhone.h codec.h messages.h browse.h
  6107. + ciatimer.o: ciatimer.c AmiPhoneMsg.h AmiPhone.h phoneudp.h\
  6108. +      AmiPhonePacket.h ciatimer.h codec.h
  6109. + codec.o: codec.c AmiPhoned.h AmiPhone.h AmiPhoneMsg.h AmiPhonePacket.h\
  6110. +      codec.h TCPQueue.h
  6111. + listen.o: listen.c
  6112. + messages.o: messages.c AmiPhone.h AmiPhonePacket.h asl.h codec.h\
  6113. +      browse.h
  6114. + microphone.o: microphone.c
  6115. + phonerexx.o: phonerexx.c phonerexx.h
  6116. + phonerexx_rxcl.o: phonerexx_rxcl.c phonerexx.h
  6117. + phonerexx_rxif.o: phonerexx_rxif.c phonerexx.h phonerexx_aux.h\
  6118. +      menuconstants.h AmiPhone.h phoneudp.h AmiPhonePacket.h ciatimer.h\
  6119. +      codec.h AmiPhoneMsg.h
  6120. + phoneudp.o: phoneudp.c AmiPhone.h AmiPhoneMsg.h stringrequest.h codec.h\
  6121. +      TCPQueue.h
  6122. + PhoneUtil.o: PhoneUtil.c codec.h AmiPhonePacket.h
  6123. + Sampler.o: Sampler.c
  6124. + StringRequest.o: StringRequest.c codec.h AmiPhone.h stringrequest.h
  6125. + TCPQueue.o: TCPQueue.c AmiPhone.h TCPQueue.h
  6126.